“Jak usunąć całą listę w Python” Kod odpowiedzi

Jak usunąć całą listę w Python

thislist = ["apple", "banana", "cherry"]
print(thislist)
del thislist
print(thislist)
Programmer of empires

Jak usunąć listy po użyciu ich w Python

lst = ['i1', 'i2', 'i3']
lst.clear() #clears the contents of list
#lst[:] can also be used
#fastest is  lst *= 0
Ugliest Unicorn

Odpowiedzi podobne do “Jak usunąć całą listę w Python”

Pytania podobne do “Jak usunąć całą listę w Python”

Więcej pokrewnych odpowiedzi na “Jak usunąć całą listę w Python” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu