Created
July 20, 2017 19:28
-
-
Save Lvl4Sword/8b18b3487d05d83e4decd750b823ded3 to your computer and use it in GitHub Desktop.
Because why not
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
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