Advertisement
Guest User

for2chanon

a guest
Aug 22nd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. class Test:
  2.     def __init__(self):
  3.         self.test_dict = {'test': 0}
  4.  
  5.  
  6. class Test_main:
  7.     def __init__(self):
  8.         self.test_ = Test()
  9.  
  10.  
  11. new1 = Test_main()
  12. new2 = Test_main()
  13.  
  14. new1.test_.test_dict['test'] = 228
  15.  
  16. print(str(new1.test_.test_dict))  # {'test': 228}
  17. print(str(new2.test_.test_dict))  # {'test': 0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement