bit.length()

-bit.length():
age = 10
r = age.bit_length() #bit.length()表示这个数字的二进制 至少 用几位数来表示

print(r)


你可能感兴趣的:(bit.length())