How to locate the bit in bits string?
steven at REMOVE.THIS.cybersource.com.au
Wed Apr 29 06:23:08 CEST 2009
On Wed, 29 Apr 2009 00:36:56 +1000, Li Wang wrote:
> Although bin(99) could be used to locate it, this transform cost too
> much memory (99 only needs 2Bytes, while string '1100011' needs 7Bytes).
This is Python, not C. Your figures are completely wrong.
Everything in Python is an object. If you're expecting C performance for
bit-twiddling operations, you aren't going to get it.
More information about the Python-list