0
I don't get y this isn't working for the no numerals challenge!
numbers = { '0':'zero', '1':'one', '2':'two', '3':'three', '4':'four', '5':'five', '6':'six', '7':'seven', '8':'eight', '9':'nine', } strg = input() def method1(string): string = list(string) for char in string: if char in '1234567890': string[string.index(char)] = numbers.get(char) fixedStrg = str() for i in string: fixedStrg += i return fixedStrg print(method1(strg))
3 Réponses
+ 5
Not forgot the number 10
+ 2
what happen if the number is 15 ? will it become onefive ? see the task again, i'm pretty sure its only convert if ten or less
https://www.sololearn.com/discuss/2145385/?ref=app
https://www.sololearn.com/discuss/2136365/?ref=app
0
i see, thank you!