.pop() method can be used to remove an item of a list or a dictionary and return that value. So, you can assign it to another variable if you’d like.
If you don’t put anything inside .pop() method’s parenthesis it will automatically pop the last item in a list.
However, you can’t do this for dictionaries since they don’t have index orders.
popped_item = lst.pop()