a = 5 # 1 + 1 = 10 + 1 = 11 + 1 = 100 + 1 = 101 print(a.bit_length()) # 计算一个数字的二进制长度. 没啥用 转载于:https://www.cnblogs.com/WANG-/p/10032147.html