Answers for "python split list in 3"

0

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)
    ]
Posted by: Guest on May-02-2020
4

python split list

string = 'this is a python string'
wordList = string.split(' ')
Posted by: Guest on March-26-2020

Python Answers by Framework

Browse Popular Code Answers by Language