Cody Bable

Generation

generate functionThu, 13 Apr 2023

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

list1 = ['a', 'b', 'c'] list2 = ['1', '2', '3'] # sorted: sort the list1 and list2 alphabetically def divide(list1): list1.sort() list2.sort() return list1, list2 divide(list1)

Questions about programming?Chat with your personal AI assistant