python基础篇----基本数据类型

bit 

#bit_length 当前数字的二进制,只用用n位来表示
a = 123
b = a.bit_length()
print(b)
#==》7

猜你喜欢

转载自www.cnblogs.com/shoebill/p/9193371.html