Guest User

Untitled

a guest
Jun 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def zvezdice(string):
  2. out = ''
  3. change = False
  4.  
  5. for char in string:
  6. if char == '*':
  7. change = not change
  8.  
  9. if change:
  10. out += str(char).swapcase()
  11. else:
  12. out += char
  13.  
  14. return out
  15.  
  16. print zvezdice('thiS is *sHiBlabal* should this *WoRk')
Add Comment
Please, Sign In to add comment