python学习笔记之基础操作(一)整数常用方法

版权声明:所有资料资源均应用作教育用途,请勿用作商业用途 https://blog.csdn.net/qq_38876114/article/details/82995638
#int()代表将字符串转换为数字输出,可以指定进制
print(int("1234556"))
1234556
print(int("a",16))
10
print(type(int("12")))
<class 'int'>

猜你喜欢

转载自blog.csdn.net/qq_38876114/article/details/82995638