strs = 'Goaod' hashTable = dict() listStrs = list(strs) i = 0 while i < len(strs): if listStrs[i] in hashTable: print("有重复字符") break else: hashTable[listStrs[i]] = None i += 1
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有