The problem is to use "remove" method to empty the list. not understanding why the loop is not deleting all elements in the list. logically, this should work but it's not working. Please identify the problem and suggest a fix or different method.
thislist = ["apple", "banana", "cherry"]
for x in thislist:
thislist.remove(x)
print(thislist)
I was trying to remove every item via remove method, yes I know that I can also use the "clear" method but the question is to use remove method. Logically this should work but it's not. please explain this.