Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python count bits

counts = bytes(bin(x).count("1") for x in range(256))  # py2: use bytearray
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #count #bits
ADD COMMENT
Topic
Name
3+9 =