What is the difference between Python’s list methods append and extend?
append: Appends object at the end. gives you: [1, 2, 3, [4, 5]] extend: Extends list by appending elements from the iterable. gives you: [1, 2, 3, 4, 5]
append: Appends object at the end. gives you: [1, 2, 3, [4, 5]] extend: Extends list by appending elements from the iterable. gives you: [1, 2, 3, 4, 5]