Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test:
- option1 = []
- def __init__(self):
- self.option2 = []
- def test(self):
- self.option1.append('test')
- self.option2.append('test')
- c = Test()
- c.test()
- print(c.option1, c.option2, '\n\n==\n') # ['test'] ['test']
- c = Test()
- c.test()
- print(c.option1, c.option2, '\n\n==\n') # ['test', 'test'] ['test']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement