# how to get the last item of a python list

```
>>> list1 = [1, 2, 3, 4, 5]
>>> print(list1[len(list1)-1])
5
>>> print(list1[-1])
5
>>> print(list1.pop())
5
>>>
```

[how to get the last element of a list in python](https://www.howtouselinux.com/post/get-last-element-of-a-list-in-python)

