Please help me understand what is wrong with this code
txt = "7, 5 4 4 3 2 2 1 7 88 8. 5 3 3 ubs uguwbb hgajdbihw. hbwhedb 10 19 7 9 8 5 3" dict = {"10" : "ten", "0": "zero", "1" : "one", "2" : "two", "3" : "three", "4" : "four", "5" : "five", "6" : "six", "7" : "seven", "8" : "eight", "9" : "nine", } x = -1 for i in txt: x += 1 if str(txt[x]).isdigit: try: print(float(txt[x] + txt[x + 1])) except ValueError: txt = txt.replace(txt[x], dict[txt[x]]) else: continue print(txt) __________________________________________________________________________________________________________________________ I wanted to do the "no numerals" challenge where I need to change the numbers 0-10 with their names and the rest as digits. Suppose the text is: "7 is an odd number while 4 and 6 are even 9, on the other hand is odd. 24 times 2 is 48" The result should be: "seven is an odd number while four and six are even nine, on the other hand is odd. 24 times two is 48" I want to do this in python