+ 2
Another way of creating an empty list
Would empty_list = list() be another way for making a new, empty list?
2 Antworten
+ 5
Another way.
x=[1,2,3]
x.clear()
print(x) #output=[]
+ 1
Never mind then. yes that also works! I tested mine cleanly.
Would empty_list = list() be another way for making a new, empty list?