Cody Bable

Generation

generate functionThu, 13 Apr 2023

divide a list into three separate list

def divide(lst): return lst[:len(lst)//3], lst[len(lst)//3:len(lst)//3*2], lst[len(lst)//3*2:] divide([1,2,3,4,5,6,7,8,9,10])

Questions about programming?Chat with your personal AI assistant