dictionary file

posted May 17, 2016, 7:45 AM by Attila Lengyel
dictonary = open("dict.txt","a")
while True:
    word1 = input("Give me a word in English:")
    if word1 == "exit":
        break
    word2 = input("Give me the word in Hungarian:")
    dictonary.write(word1)
    dictonary.write("\n")
    dictonary.write(word2)
    dictonary.write("\n")
    
dictonary.close()

Comments