The example could have been shorter. Here it is with using numbers, lists, and no classes.
def main(): nums = [x for x in range(10)] print nums for num in nums: nums.remove(num) print nums