链接: https://pan.baidu.com/s/1lnlzPVqMSprb9ZZZDoTbxw 密码: 38sn
# str list tuple, 可以遍歷,切片
s = "abcdef"
# 012345
print(s, s[2], s[3 : 5], type(s))
#s[1] = "B" # 有序,只讀
li = list(range(1, 11))
print(li, li[2], li[2 : 5], type(li))
# 0123......len(li) - 1
li[2] = 20 # 有序,可修改
t = tuple(range(1, 11))
print(t, t[2], t[2 : 5], type(t))
#t[1] = 30 # 有序,只讀
# d = {key : value}
d = {1 : 'a', 1.5 : 100, 'b' : 3.3, "hello" : "jeapedu", 194 : 184}
print(d)
print(d['b'])
print(d['hello'])
print(d[1.5])
# dict_name[key] => value
# string_name[index] => value