Created
August 27, 2019 17:25
-
-
Save messiest/f50c2ab4fcaeca88f24a9a3e3ea55e33 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
def camel_case(s): | |
s = s.split() | |
leading = [x.lower() for x in s[:1]] | |
trailing = [x.capitalize() for x in s[1:]] | |
return ''.join(leading + trailing) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment