Created
March 25, 2016 10:13
-
-
Save kenichi-fukushima/a82160f4aa2b1acc183b 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
import re | |
import sys | |
def ToScreamingSnakeCase(s): | |
return '_'.join([m.group().upper() for m in re.finditer(r'[A-Z][a-z]*', s)]) | |
for line in sys.stdin: | |
print ToScreamingSnakeCase(line) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment