Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51543 > unrolled thread
| Started by | Peter Otten <__peter__@web.de> |
|---|---|
| First post | 2013-07-30 07:06 +0200 |
| Last post | 2013-07-30 07:06 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Bitwise Operations Peter Otten <__peter__@web.de> - 2013-07-30 07:06 +0200
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2013-07-30 07:06 +0200 |
| Subject | Re: Bitwise Operations |
| Message-ID | <mailman.5300.1375160802.3114.python-list@python.org> |
Devyn Collier Johnson wrote: > On Python3, how can I perform bitwise operations? For instance, I want > something that will 'and', 'or', and 'xor' a binary integer. >>> 0b1010 | 0b1100 14 >>> bin(_) '0b1110' >>> 0b1010 & 0b1100 8 >>> bin(_) '0b1000' >>> 0b1010 ^ 0b1100 6 >>> bin(_) '0b110'
Back to top | Article view | comp.lang.python
csiph-web