[Solved] How to print last deleted element from the list? [closed]


my_list = [1, 2, 5, 8, 15, 25]

deleted_elements = []
deleted_elements.append(my_list.pop())
deleted_elements.append(my_list.pop())
deleted_elements.append(my_list.pop())

print(my_list)
print(deleted_elements)

print("Last deteleted: " + str(deleted_elements[-1]))

solved How to print last deleted element from the list? [closed]