I'm beginner, i have homework that requires the user to input a number and it convert it to words.For example:
15342
to
one five three four two
this's my code, but it only work with a number:
def convert_text():
arr = ['zero','one','two','three','four','five','six','seven','eight','nine']
word = arr[n]
return word
n =int(input())
print(convert_text())
I am not allowed to use the num2word library and dictionary.