SHARE
TWEET

Untitled

a guest Oct 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def countBits(num):
  2.     '''Count number of bits in a positively signed number.'''
  3.     count = 0
  4.     for i in iter(lambda: fn(num), 0):
  5.         num = i
  6.         count += 1
  7.     return count + 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top