アルファベットの重複がない単語を抽出する方法2022/5/18 / 1 min readView more blogs with the tag pythonTable of Contents#はじめに#方法はじめに アルファベットの重複がない単語を抽出する方法です。 方法 words = ['about', 'is', 'cat', 'skill', 'test'] word_list = []for word in words: alp_dic = {} for char in word: alp_dic[char] = alp_dic.get(char, 0) + 1 if max(alp_dic.values()) == 1: word_list.append(word) # output: word\_list = ['about', 'is', 'cat']