In Python, lists are mutable sequences that provide built-in methods such as append() to add an element to the end, pop() to remove and return an element (by default the last one), and sort() to order the elements in place. Dictionaries and tuples do not support this same set of operations (tuples are immutable and lack these methods, and dictionaries lack append() and sort()), so lists are the data structure being manipulated.
Community Discussion