Created
October 10, 2017 12:48
-
-
Save hassanshamim/c3de4e3e8932700e1265990c9ba55374 to your computer and use it in GitHub Desktop.
capwords.py
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
def capwords(text, sep=None): | |
return (sep or ' ').join(word.capitalize() for word in text.split()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment