对象类型 | 示例 |
数字 | 1, 3.14, 3+4j |
字符串 | 'abc', "hello world", '''Python ''' |
日期 | 2016-08-25 |
列表 | [1, 2, 3] |
字典 | {1:'food' ,2:'taste', 3:'import'} |
元组 | (3, 4 6) |
文件 | f=open('data.dat', 'r') |
集合 | set('abc'), {'a', 'b', 'c'} |
布尔型 | True, False |
空类型 | None |
编程单元类型 | 函数、模块、类 |