📜  十进制转换python代码示例

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

代码示例1
#Example with binary number 10101100 which is 172 in denary

number = 10101100
print(int(str(number),base=2))

#Prints out the denary value so 172 in this example.