Cody Bable

Generation

generate functionThu, 13 Apr 2023

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

def div(a): x = [] y = [] z = [] for i in a: if i.isdigit(): x.append(i) else: y.append(i) z = x + y return z div(['a', 'b', 'c', '1', '2', '3'])

Questions about programming?Chat with your personal AI assistant