Cody Bable

Generation

generate functionThu, 13 Apr 2023

divide list ['a', 'b', 'c', '1', '2', '3'] evenly into three separate list

def divide_list(l): return l[:int(len(l)/3)], l[int(len(l)/3):int(len(l)/3)*2], l[int(len(l)/3)*2:] divide_list(['a', 'b', 'c', '1', '2', '3'])

Questions about programming?Chat with your personal AI assistant