Contact: aviboots(AT)netvision.net.il
41,615 questions
54,278 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 '''