Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zvezdice(string):
- out = string.split('*')
- for i in range(1,len(out),2):
- sub_original = out[i].lower()
- sub = ''
- up = True
- for j in sub_original:
- if up: sub += j.upper()
- else: sub += j
- up = not up
- out[i] = sub
- return ''.join(out)
- print(zvezdice('thiS is *dVA* should this *WoRk'))
Add Comment
Please, Sign In to add comment