Created
October 24, 2019 19:45
-
-
Save austlane/f5261916db725358e3597e7ddf38c6fa to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python3 | |
import sys | |
iN_sTrInG = ' '.join(sys.argv[1:]) | |
yEeT_sTrInG = "" | |
yEeT_sTaTe = False | |
for cHaRaCtEr in iN_sTrInG: | |
if cHaRaCtEr.isalpha(): | |
if yEeT_sTaTe: | |
yEeT_sTrInG = yEeT_sTrInG + cHaRaCtEr.upper() | |
else: | |
yEeT_sTrInG = yEeT_sTrInG + cHaRaCtEr.lower() | |
yEeT_sTaTe = not yEeT_sTaTe | |
else: | |
yEeT_sTrInG = yEeT_sTrInG + cHaRaCtEr | |
print(yEeT_sTrInG) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Austin.lane$ ./yEeT.pY Matt thinks I need help
mAtT tHiNkS i NeEd HeLp