-
Text Type
str
-
Numeric Types
int
,float
,complex
- complex 复数
-
Sequence Types
list
,tuple
,range
,set
-
Mapping Type
dict
-
Slice: 左闭右开
Set
myset = {"apple", "banana", "cherry"}
myset.add(word)
All elements are unique
A set is a collection which is unordered, unchangeable, and unindexed.
Note: Set items are unchangeable, but you can remove items and add new items.
newtup = tuple(set(tup)–{'PYTHON'}) # 去重同时删除数据项
Tuple
Elements can’t be changed
len
max
min
tuple(seq)