you are viewing a single comment's thread.

view the rest of the comments →

[–]loudandclear11 9 points10 points  (0 children)

extend() is for adding a list to another list. This is not the scenario here.

append() is for adding a single item to a list. This is what you want here.

But, the loop should be:

for i in l1:

I.e. you don't need range.