Skip to content

Instantly share code, notes, and snippets.

@cjwinchester
Created July 17, 2018 15:51
Show Gist options
  • Save cjwinchester/91daba34dd3d2df3aa0105cef222abe2 to your computer and use it in GitHub Desktop.
Save cjwinchester/91daba34dd3d2df3aa0105cef222abe2 to your computer and use it in GitHub Desktop.
Spongebob-ify some text.
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