如何用函数表示十进制转二进制(含0和负数情况)
def mybin(x): return bin(x).replace('0b', '') print(mybin(-15)) print(mybin(0)) print(mybin(16))