I am having trouble with Tuccin to English. I can get it to translate in from English to Tuccin only. What I want is if word is English translate to Tuccin, If word is Tuccin, translate to English full phrases. And finally if any input words are not stored I want it To print that same word in its own place so show there was Nothing to translate it to.
#Translator.py
Tuc={"i":["o"],"love":["wau"],"you":["uo"],"me":["ye"],"my":["yem"],
"mine":["yeme"],"are":["sia"]}
phrase=True
reverseLookup = False
while True:
reverseLookup = False
translation = str(raw_input("Enter content for translation.\n").lower())
input_list = translation.split()
#English to Tuccin
if phrase ==True:
print "*English Detected!"
for word in input_list:
if word in Tuc:
print ("".join(Tuc[word]))
else:
reverseLookup = True
#Tuccin to english
elif phrase == True and reverseLookup == True:
print "*Tuccin Detected!"
input_list = translation.split()
for k, v in Tuc.iteritems():
if translation in v:
print k
else:
print "Word Not Stored!"
reverseLookup = False
print word