python常用函数 B

B

bin(int)

将整数x转换为二进制字符串,如果x不为Pythonint类型,x必须包含方法__index__()并且返回值为integer

例子:

 

原文地址:https://www.cnblogs.com/small-office/p/9337687.html