MARK C. answered 9d
Computer Programming Tutor | C++/Python/Data Structures | 20 Years Exp
The key difference:
append() adds its argument as a single element to the end of the list. If you append a list, the entire list becomes one element.
extend() takes an iterable and adds each item from it individually to the list.
Examples:
If you have my_list = [1, 2, 3]
Using append([4, 5]) gives you [1, 2, 3, [4, 5]] - the list [4, 5] is added as one nested element
Using extend([4, 5]) gives you [1, 2, 3, 4, 5] - each number is added separately