string.capwords()

string.capwords(s, sep=None)

Split the argument into words using str.split(), capitalize each word using str.capitalize(), and join the capitalized words using str.join(). If the optional second argument sep is absent or None, runs of whitespace characters are replaced by a single space and leading and trailing whitespace are removed, otherwise sep is used to split and join the words.

doc_python
2016-10-07 17:43:23
Comments
Leave a Comment

Please login to continue.