Created
November 20, 2022 22:51
-
-
Save narskidan/8a5377bbcdfa48825bd88bf19ab3addf to your computer and use it in GitHub Desktop.
Quick one liner I used to make a long title camel case
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
' '.join([i[0].upper() + i[1:] for i in s.split()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And thanks to StackOverflow, I've now learned about the
.title()
method for strings: https://stackoverflow.com/questions/8347048/how-to-convert-string-to-title-case-in-python