PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
import string
numbers=['zero','one','two','three','four','five','six','seven','eight','nine']
while True:
text=input("Enter your text here\n")
ct=""
for i in range(len(text)):
xM1 = text[i-1] if i>0 else " "
xP1 = text[i+1] if i+1<len(text) else " "
ct+=text[i] if text[i] in string.ascii_letters else " "
ct+=numbers[string.digits.index(text[i])] if (text[i].isdigit() and xM1==" " and xP1==" ") else text[i]
print(ct)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run