woerter = {} fobj = open("woerterbuch.txt", "r") for line in fobj: line = line.strip() zuordnung = line.split(" ") woerter[zuordnung[0]] = zuordnung[1] fobj.close() fobj2 = open("ausgabe.txt", "w") #1 for engl in woerter: print(engl, woerter[engl], sep=":", file=fobj2) #2 fobj2.close()