Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mask = 0b0100
- def check_bit4(input):
- test = input & mask
- if test:
- return "on"
- else:
- return "off"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement