Ad
Code
Diff
  • def converter(n):
        return dict(enumerate(("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"))).get(n)
    
    • def converter(number):
    • try:
    • return ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"][number]
    • except IndexError:
    • return None
    • def converter(n):
    • return dict(enumerate(("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"))).get(n)