python的数据类型

2024-10-28 04:08:45

1、先用putty连接阿里云,然后输入python。你也可以再本地使用python。在这里,你可以看到python的版本等一些信息。

python的数据类型

3、我们先用print输出a,然后再用python的type()函数对其进行类型的输出。a的值为1,为int型。

python的数据类型

5、我们先用print输出c,然后再用python的type()函数对其进行类型的输出。c的值为123,为str型。

python的数据类型

7、e,f,g这些变量的类型分别是列表,元组,字典。元组是不可以重新赋值,列表和字典是可以的。

python的数据类型
猜你喜欢