摘要: def dict1(x): fen = open('words.txt') dict2 = dict() for line in fen: word=line.strip() dict2[word]='' print(dict2) if x in dict2: print('in') else: p 阅读全文
posted @ 2022-03-18 18:03 玫瑰少年 阅读(186) 评论(0) 推荐(0) 编辑
摘要: def has_duplicates2(list): birthd = list[:] for i in birthd: count = 0 for j in birthd: if i == j: count= count+1 if count > 1: print('true2') return 阅读全文
posted @ 2022-03-18 17:07 玫瑰少年 阅读(128) 评论(0) 推荐(0) 编辑