python中如何将int类型数据转换为字符串类型

2024-10-31 14:46:55

1、打开pycharm,并且新建一个py文件。

python中如何将int类型数据转换为字符串类型

3、利用print(type(a))来查看变量a的类型,为int类型。

python中如何将int类型数据转换为字符串类型

5、再次打印变量a的数据类型,可以看到转换为str,字符串类型了。

python中如何将int类型数据转换为字符串类型
猜你喜欢