Skip to content

How to clear a list in Python?

your_list = [1,2,3,4,5,6,7,8,9,10]
your_list.clear() #List becomes [] empty
See also  Python code snippet - How to add new column to dataframe?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.