1# The pop function, without an input, defaults to removing
2# and returning the last item in a list.
3myList = [1, 2, 3, 4, 5]
4myList.pop()
5print(myList)
6
7# You can also do this without returning the last item, but it is
8# much more complicated.
9myList = [1, 2, 3, 4, 5]
10myList.remove(myList[len(myList)-1])
11print(myList)
1>>> l = list(range(1,5))
2>>> l
3[1, 2, 3, 4]
4>>> l.pop()
54
6>>> l
7[1, 2, 3]
8