bin(x) 将整数x转换为二进制字符串

>>> a
122
>>> b
344
>>> c = bin(a)
>>> d = bin(b)
>>> c
'0b1111010'
>>> d
'0b101011000'
>>> 
原文地址:https://www.cnblogs.com/blogofwyl/p/4658491.html