diff --git a/main.py b/main.py index adca94c..6899408 100644 --- a/main.py +++ b/main.py @@ -44,7 +44,6 @@ alphabet = [["A", ".-"], morse_cipher = "..-..--..-......-" - def latin_to_morse(expression, delimiter=""): # expression: zu übersetzendes Wort result = "" for letter in expression: @@ -115,22 +114,20 @@ def deciphering_1(): print("Found something: ", vocab_guesses) -dictDE_file = open("wordlist-german.txt", "r") -dictEN_file = open("wordlist-english.txt", "r") +dictDE_file = open("wordlist-german.txt", "r", encoding="utf-8") +dictEN_file = open("wordlist-english.txt", "r", encoding="utf-8") -#reader = csv.reader(dictDE_file) -#dictDE = [row[0].upper() for row in reader] +reader = csv.reader(dictDE_file) +dictDE = [row[0].upper() for row in reader] reader = csv.reader(dictEN_file) dictEN = [row[0].upper() for row in reader] -dictionary = dictEN +dictionary = dictDE #dictionary = ["FEMINIST", "TERESA", "INA", "ES", "MIT", "SEIT", "ID"] dictMORSE = wordlist_to_morse(dictionary) print("dictMORSE erstellt") phrase_kit = guess_vocabs_BUT_AWESOME(morse_cipher, dictMORSE) -for result in phrase_kit[17]: - print(result) -for result in phrase_kit[16]: - print(result) -for result in phrase_kit[15]: +for result in phrase_kit[1]: print(result) + +