Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split list in 3 part

def even_divide(lst, num_piece=4):
    return [
        [lst[i] for i in range(len(lst)) if (i % num_piece) == r]
        for r in range(num_piece)
    ]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #list #part
ADD COMMENT
Topic
Name
5+4 =