Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Re-assigning mutable objects
- int_a = 10
- print type(int_a), id(int_a)
- # <type 'int'> 16577968
- int_aa = int_a
- print type(int_aa), id(int_aa)
- # <type 'int'> 16577968
- print int_aa is int_a
- # True
- int_aa = 20
- print int_a, int_aa
- # 10 20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement