Skip to content

Instantly share code, notes, and snippets.

@Lvl4Sword
Created July 20, 2017 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lvl4Sword/8b18b3487d05d83e4decd750b823ded3 to your computer and use it in GitHub Desktop.
Save Lvl4Sword/8b18b3487d05d83e4decd750b823ded3 to your computer and use it in GitHub Desktop.
Because why not
import string
a = input('Input text to Spongebobify: ')
b = []
upper_case = False
for each in range(0, len(a)):
if a[each] in string.ascii_letters:
if not upper_case:
b.append(a[each].lower())
upper_case = True
else:
b.append(a[each].upper())
upper_case = False
else:
b.append(a[each])
print(''.join(b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment