pop()
` method with the index `-1
`. Here's an example :my_list = [1, 2, 3, 4, 5]
my_list.pop(-1)
print(my_list) # Output: [1, 2, 3, 4]
[1, 2, 3, 4]
del
` keyword with the same index :my_list = [1, 2, 3, 4, 5]
del my_list[-1]
print(my_list) # Output: [1, 2, 3, 4]
[1, 2, 3, 4]