Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> a = 255 # or another number from -5 to 256
- >>> b = 999 # or another number outside -5 to 256
- >>> a is 255
- True
- >>> b is 999
- False
- $ python3.7 -VV
- Python 3.7.3 (default, Mar 26 2019, 01:59:45)
- [GCC 5.4.0 20160609]
- Python 3.7.3 (default, Mar 26 2019, 01:59:45)
- [GCC 5.4.0 20160609] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>> a = 255
- >>> b = 999
- >>> print("255:", a is 255)
- 255: True
- >>> print("999:", b is 999)
- 999: False
- #!/usr/bin/env python3.7
- # -*- coding: utf-8 -*-
- a = 255
- b = 999
- print("255:", a is 255)
- print("999:", b is 999)
- $ python3.7 test.py
- 255: True
- 999: True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement