The Python list clear() method is used to delete all elements of the specified list.
list.clear()
No parameter is required.
In the below example, the list clear() method is used to delete all elements of the list called MyList.
MyList = [10, 50, 50, 100, 1000, 1000] MyList.clear() print(MyList)
[]