built in function to remove items from a list in python code example
Example: delete all elements in list python
mylist = [1, 2, 3, 4]
mylist.clear()
print(mylist)
# []
mylist = [1, 2, 3, 4]
mylist.clear()
print(mylist)
# []