Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class a:
- int = 0
- def __init__(self):
- self.list = []
- arr = [a() for each in range(3)]
- arr[0].list.append('something')
- arr[0].int = 5
- for i in range(3):
- print '%d: %d, int=%d' % (i, len(arr[i].list), arr[i].int)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement