Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- populationList = []
- for i in range(0, 2000)
- populationList.append(myObject).
- populationList = []
- >>> class Foo:
- ... def __init__(self, x):
- ... self.x = x
- ... def __del__(self):
- ... print(self.x, 'deleted')
- ...
- >>> populationList = []
- >>> for i in range(5):
- ... populationList.append(Foo(i))
- ...
- >>> populationList = []
- 4 deleted
- 3 deleted
- 2 deleted
- 1 deleted
- 0 deleted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement