List and Functions


someone can explain me why I can’t use the range(len(lists))

def flatten(lists):
results = []
HERE >>>> for numbers in lists:
for number in numbers:
return results

print flatten(n)

def flatten(lists):
    results = []
    for i in range(len(lists)):
        for j in lists[i]:
    return results


Thank you so much I understand how to make one list.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.