# 列表 lst = [1, 2, 3, 4] print(lst[0]) # 1 lst.append(5) print(lst) # [1, 2, 3, 4, 5] # 元组 tup = (1, 2, 3) print(tup[0]) # 1 # 集合 s = {1, 2, 3} s.add(4) print(s) # {1, 2, 3, 4} # 字典 d = {'name': 'Tom', 'age': 20} print(d['name']) # Tom