Cody Bable

Generation

generate functionThu, 13 Apr 2023

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

def my_fun(l): return l[0:2], l[2:4], l[4:6] my_fun(['a', 'b', 'c', '1', '2', '3'])

Questions about programming?Chat with your personal AI assistant