>>> x='123abc' >>> b=bin(int(x,16))[2:] >>> print(b) 100100011101010111100 转载于:https://www.cnblogs.com/sea-stream/p/10315063.html