Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

convert list to list of lists on every n elements python

n = 5
my_list_of_lists = [my_list[i:i + n] for i in range(0, len(my_list), n)]
 
PREVIOUS NEXT
Tagged: #convert #list #list #lists #elements #python
ADD COMMENT
Topic
Name
2+4 =