Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import swapcase
- def zvezdice(str):
- out = ''
- change = False
- for char in str:
- if char == '*':
- change = not change
- if change:
- out += swapcase(char)
- else:
- out += char
- return out
- print zvezdice('thiS is *sHiBlabal* should this *WoRk')
Add Comment
Please, Sign In to add comment