TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
Python
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General Python Programming
Lounge
Jobs
Forum
Beginners
Please help
Please help
Dec 14, 2016 at 5:09pm
Dec 14, 2016 at 5:09pm UTC
newbie456
(35)
How to flip bits of a number in Python? for ex: 5->101 should become 010 which is 2
Dec 14, 2016 at 5:26pm
Dec 14, 2016 at 5:26pm UTC
AbstractionAnon
(6954)
Use the XOR bitwise operator (^).
http://www.Python/doc/boolean/
Topic archived. No new replies allowed.