Skip to content

Ariefah Shalihah

  • Home
  • About

How to delete all the items in a list in Python

Use list.clear()

Use the del keyword

Set the entire list to an empty list



how-to-delete-all-the-items-in-a-list-in-python

Categories PYTHON
Post navigation
How to delete all files with a specific extension in Python
How to delete an array in Python

Recent Posts

  • How asynchronously call methods in Python
  • How get a function name as a string in Python
  • How pretty print a JSON file in Python
ariefahshalihah