0
Some short this code |
phrase = input("enter you string : ") if "1" in phrase: x=phrase.replace("1","one") print(x) if "2" in phrase: x=phrase.replace("2","two") print(x) if "3" in phrase: x=phrase.replace("3","three") print(x) if "4" in phrase: x=phrase.replace("4","four") print(x) if "5" in phrase: x=phrase.replace("5","five") print(x) if "6" in phrase: x=phrase.replace("6","six") print(x) if "7" in phrase: x=phrase.replace("7","seven") print(x) if "8" in phrase: x=phrase.replace("8","eight") print(x) if "9" in phrase: x=phrase.replace("9","nine") print(x) print(phrase)
1 Answer
+ 8
Something like this?
https://code.sololearn.com/c2Yqyq0upZED