At the moment I have...(excuse the indentation, it's fine in the code, b****y iPad)
- Code: Select all
for a in ascore:
if a.anim == False:
a = None
But after quitting the program and typing 'print ascore' I still get a list of references to all the instances created.
I also had...
- Code: Select all
a.remove()
to remove the instance from the list but that threw a spanner in the works, something to do with doing it while still looping through the list.
Basically, how do I remove an item from a list while still being able to loop through the list and how do I delete an instance of a class?
Thanks in advance.
Dave.