Answers for "clear all elements in list python"

6

how to clear a list in python

yourlist = [1,2,3,4,5,6,7,8]
del yourlist[:]
Posted by: Guest on April-08-2020
0

python list remove all elements

l = [1,2,3,4]
l.clear()
Posted by: Guest on April-12-2020

Code answers related to "clear all elements in list python"

Python Answers by Framework

Browse Popular Code Answers by Language