Data Structures --Python
Python貌似有很多内置的数据类型
看的几本书都不完全一样,但也差不多
- numbers 数值
- strings 字符串
- lists 列表
- tuples 元组
- dictionaries 字典
看的有点混乱
不过基本都有详细讲 lists,tuples,dictionaries三种
lists:
>>>a=[3.31,534,[54,'cat']'eggs'] >>>a a=[3.31,534,[54,'cat']'eggs']
tuples:
>>>b=56,4.43,'dog' >>>b (56,4,43,'dog')
dictionaries:
>>>dict={'jack':342,'sape':'ax'} {'jack':342,'sape':'ax'}
imutable basic types 不可变基本类型
numbers,strings,tuples (数值,字符串,元组)
mutable basic types
lists,dictionaries,and most other types (字典,链表和其它的)
还有好多详细的记不太清了,赶紧复习一下...