list.pop(obj=list[-1]):
Here, −1 represents the last element of the list. Hence, the pop() function removes the last object (obj) from the list.
Get certified in Python from the top Python Course in Singapore now!