Redus Russ

Generation

generate functionMon, 06 Feb 2023

a function that puts the arrays given into another array

def flatten(lst): return [item for sublist in lst for item in sublist] flatten([[1, 2, 3], [4, 5, 6]])

Questions about programming?Chat with your personal AI assistant