python基础 变量类型

python 在定义变量的过程当中不需要指定类型

python 变量类型分为数字型和非数字型

数字型包括 int 、float、 bool(非零即是真)、 complex(复数型)

非数字型包括 元组 、字符、列表、字典

可以通过type函数获得一个变量的具体类型

猜你喜欢

转载自blog.csdn.net/weixin_41918727/article/details/89746144