Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zamien(ciag):
- wyn = ''
- for el in ciag:
- if(el.isdigit()):
- wyn += liczebniki[el] + ' '
- return wyn
- liczebniki = {'0':'zero','1':'jeden', '2': 'dwa', '3':'trzy', '4':'cztery', '5':'piec', '6':'szesc', '7':'siedem','8':'osiem','9':'dziewiec'}
- liczbaIn = input('Podaj liczbe: ')
- wyn = zamien(liczbaIn)
- print (wyn);
Advertisement
Add Comment
Please, Sign In to add comment