Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def number_to_word(word):
- dic = {
- '0': 'zero',
- '1': 'jeden',
- '2': 'dwa',
- '3': 'trzy',
- '4': 'cztery',
- '5': 'pięć',
- '6': 'sześć',
- '7': 'siedem',
- '8': 'osiem',
- '9': 'dziewięć'
- }
- result = ""
- for letter in word:
- if letter.isdigit():
- result += dic[letter] + " "
- return result[:-1]
- print(number_to_word('1410'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement