# 字符串 sen = 'this' print(type(sen)) print(sen) # 数组 list1 = ['this', 'is', 'a', 'python', 'project'] for i in list1: print(i) print(len(list1)) print(type(list1)) # 元组 tu = tuple(list1) print(tu) print(type(tu)) for u in tu: print(u) print(tu[2]) # 字典 di = {'kkk': 116, 'hhh': 117, 'ggg': 118} print(di['hhh']) # print(di) for key in di: print((str(key) + ':' + str(di[key]))) # 集合 s = set([3, 4, 5, 6, 6, 3, 6]) #重复元素会被自动过滤 print(s) s.add("a") print(s) for ss in s: print(ss)