Skip to content

Instantly share code, notes, and snippets.

@hassanshamim
Created October 10, 2017 12:48
Show Gist options
  • Save hassanshamim/c3de4e3e8932700e1265990c9ba55374 to your computer and use it in GitHub Desktop.
Save hassanshamim/c3de4e3e8932700e1265990c9ba55374 to your computer and use it in GitHub Desktop.
capwords.py
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