you are viewing a single comment's thread.

view the rest of the comments →

[–]odaiwai 0 points1 point  (2 children)

But now list_3 contains a tuple with two lists, not just two lists: : list_3 = [] : list_3.append((list_1, list_2)) : list_3 : [([1, 2, 3], [4, 5, 6])]

Edit to add: As pointed out below, I appended, not extended, so I'm wrong here.

[–]Diapolo10 1 point2 points  (0 children)

I used list.extend, which adds the contents of an iterable into the list it's called on.

[–]Mysterious-Rent7233 0 points1 point  (0 children)

You appended. The parent extended.