YouTip LogoYouTip

Python Clear List

# Python3.x Python Clear List [![Image 3: Document Object Reference](#) Python3 Examples](#) Define a list and clear it. You can use the `clear()` method to achieve this. ## Example 1 TUTORIAL =[6,0,4,1] print('Before clearing:', TUTORIAL) TUTORIAL.clear() print('After clearing:', TUTORIAL) The output of the above example is: Before clearing: [6, 0, 4, 1]After clearing: [] [![Image 4: Document Object Reference](#) Python3 Examples](#)
← Git Create RepositoryDjango Nginx Uwsgi β†’