📜  二进制转十进制python代码示例

📅  最后修改于: 2022-03-11 14:45:50.764000             🧑  作者: Mango

代码示例1
==== Convert binary to decimal in Python ======
a = '11001100' # input a binary

b = int(a,2) # base 2 to base 10
print(b,type(b)) # 204