Write a function that takes an integer as input argument and returns the integer using words. For example if the input is 4721 then the function should retur
There is a way that is simpler than the rest:
def number_to_words(number) words = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"] return " ".join(words[int(i)] for i in str(number))