youtube-code/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or2.py
2022-11-05 14:07:34 +00:00

10 lines
No EOL
208 B
Python

READ_PERMISSION = 4
WRITE_PERMISSION = 2
EXECUTE_PERMISSION = 1
userPermissions = READ_PERMISSION | WRITE_PERMISSION
userPermissions |= EXECUTE_PERMISSION
print(userPermissions)
print(bin(userPermissions))