一. 去重并保持原来元素的顺序 def dedupe(items): h = [] for item in items: if item not in h: h.append(item) return h #a = [, , , , , , , ] a = [ {, }, {, }, {, }, {, }] b = dedupe(a) print(b) 二. 命名切片 假定你有一段代码要从一个记录字符串中几个固定位置提取出特定的数据字段,用切片取出想要的字符 record = '........