Hello,
Im currently writing code for a program that translates a line of text from English into German then back again. Its a big loop that needs to be executed the same number of times as words in the text. I'm almost there but there doesn't seem to be anything on big for loops. I know the general idea but I cant get it to work with this one. any help would be great. This code is for the first word in the phrase.
def translate(phrase):
words = phrase.split()
position0 = english_to_german.index(words[0])
position0 = position0 + 1
german_0 = english_to_german[position0]
location0 = german_to_english.index(german_0)
location0 = location0 + 1
english_0 = german_to_english[location0]
print english_0