how to remove whole content in a list python code example
Example 1: delete all elements in list python
mylist = [1, 2, 3, 4]
mylist.clear()
print(mylist)
# []
Example 2: how to remove a element from list in python and print it
pop(n) removes the element at the given index number and can print it