Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python split list

list = [11, 18, 19, 21]

length = len(list)

middle_index = length // 2

first_half = list[:middle_index]
second_half = list[middle_index:]

print(first_half)
print(second_half)
Source by appdividend.com #
 
PREVIOUS NEXT
Tagged: #python #split #list
ADD COMMENT
Topic
Name
2+4 =