The pop() method removes the item at the given index from the list. The method also returns the removed item.
The syntax of the pop() method is:
list.pop(index)
Example:-
language = ['Python', 'Java', 'C++', 'French', 'C']
return_value = language.pop(3)
print('Return Value: ', return_value)
print('Updated List: ', language)
Output:-
Return Value: French
Updated List: ['Python', 'Java', 'C++', 'C']