# Jumble Unscrammbler # print("This program was created to beat the jumble") print("unscrammble game that was known for being in") print("the newspaper with the crossword puzzle.") print("The program uses a word list(all the way on") print("right) to unscrammbled the given letters") print("into a word starting with the letter 'v'") print("="*45) def get_file(given_word): word_file = open("wordList.txt", 'r') original_word_list = list(given_word) original_word_list.sort() sorted_string_2 = ''.join(original_word_list) for word in word_file: if word[0] == 'v': word = word.strip() word_list = list(word) word_list.sort() sorted_string = ''.join(word_list) if sorted_string == sorted_string_2: print(given_word," "*5,word) print("given"," "*5,"unscrammbled") print("-"*30) get_file('ervse') get_file('ailrv') get_file('lloevy') get_file('etavac') get_file('evtdoe') get_file('ginriv') get_file('yivelr') get_file('seelsv') get_file('tvinaal') get_file('vousair') get_file('osebrve') get_file('tacavion') get_file('doetailv') get_file('leventina')