Feb-09-2018, 01:02 PM
I'm trying to write a program that allows you to input a string of words, and then it translates them into my own custom language. I didn't get far before i realized that there was a serious problem where the code printed the results.
Please tell me how to get the translation all on the same line!
def lettertranslation(): letter=input("Enter a letter, or type 'quit', to exit:") letter_list = list(letter) for letter_list in letter: if "a" in letter_list: print ("ba") elif "b" in letter_list: print ("ru") elif "c" in letter_list: print ("no") elif "d" in letter_list: print ("de") elif "e" in letter_list: print ("fi") elif "f" in letter_list: print ("ne") lettertranslation()
Please tell me how to get the translation all on the same line!