Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

device one list into 2 list python

def split_list(a_list):
    half = len(a_list)//2
    return a_list[:half], a_list[half:]

A = [1,2,3,4,5,6]
B, C = split_list(A)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #device #list #list #python
ADD COMMENT
Topic
Name
9+2 =