mylist = [1, 2, 3, 4]
mylist.clear()
print(mylist)
# []
# this clear whole elements from list
thislist = ["apple", "banana", "cherry"]
thislist.clear()
characters = ["Eren Yeager", "Mikasa Ackerman", "Armin Arlert"]
del characters[:]
print(characters)
# Deleting list items
my_list = ['p', 'r', 'o', 'b', 'l', 'e', 'm']
# delete one item
del my_list[2]
print(my_list)
# delete multiple items
del my_list[1:5]
print(my_list)
# delete the entire list
del my_list
# Error: List not defined
print(my_list)
thislist = ["apple", "banana", "cherry"]
print(thislist)
del thislist
print(thislist)
l = [1,2,3,4]
l.clear()
pop(n) removes the element at the given index number and can print it
clear()