Removes and returns the item at the specified index.
- Optional. Index of the item you want to delete. Default value is -1 (the last item in the list).
The same that was deleted.
O(1) for pop() O(n) for pop(index)
>>> [1, 2, 3].pop() 3 >>> [1, 2, 3].pop(0) 1