Answers for "longest seven segment word"

0

longest seven segment word

words_file = open("words.txt", "r")
words = words_file.read().lower().splitlines()
not_writable_letters = ["g", "k", "m", "q", "v", "w", "x", "z"]
seven_segment_words = []


def word_checker(word):
    word_contains_aloud_letters = not any(letter in word for letter in not_writable_letters)
    if word_contains_aloud_letters:
        seven_segment_words.append(word)


for word in words:
    word_checker(word)

longest_seven_segmented_word = max(seven_segment_words, key=len)
print(longest_seven_segmented_word)
Posted by: Guest on March-28-2021

Code answers related to "longest seven segment word"

Browse Popular Code Answers by Language