Cody Bable

Generation

generate functionThu, 13 Apr 2023

divide a list into three separate list

def divide(lst): lst1 = lst[0:3] lst2 = lst[3:6] lst3 = lst[6:] return lst1, lst2, lst3 divide([1,2,3,4,5,6,7,8,9])

Questions about programming?Chat with your personal AI assistant