python list clear()

Here I’ll talk to you about clear() method in python lists. Clear Method is used to Remove or clear all the members or items from the list.

Note: No parameters are used in clear() method. Clear() only use to empty the the python lists.

Check the examples below how to use clear() method

Example#1

Output/Results

 

Example#2

Output/Results

 

 

 

Get More Python Tutorials