Contact: aviboots(AT)netvision.net.il
39,888 questions
51,815 answers
573 users
# bit_length() - Return the number of bits necessary to represent an integer in binary, # excluding the sign and leading zeros: n = -58 print(bin(n)) print(n.bit_length()) ''' run: -0b111010 6 '''