Python –如何将int转换为String

1,584次阅读
没有评论

Python

在Python中,我们可以使用str()将int转换为String。

num1 = 100
 
print(type(num1))  # <class 'int'>
 
num2 = str(num1)
 
print(type(num2))  # <class 'str'>

输出量:

<class 'int'>
<class 'str'>

本文转载自: https://blog.csdn.net/

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:wuyou2021-05-18发表,共计229字。
新手QQ群:570568346,欢迎进群讨论 Python51学习