Created
July 17, 2018 15:51
-
-
Save cjwinchester/91daba34dd3d2df3aa0105cef222abe2 to your computer and use it in GitHub Desktop.
Spongebob-ify some text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import zip_longest | |
def spongebobify(text): | |
up = text[::2].upper() | |
low = text[1::2].lower() | |
return ''.join([''.join(x) for x in list(zip_longest(up,low,fillvalue=''))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment