6 examples of 'capitalize in python' in Python

Every line of 'capitalize in python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
1085def _capitalize(s):
1086 return ' '.join(p.capitalize() for p in s.split())
63def capitalize(s):
64 s = s.lower()
65 return s[0].upper() + s[1:]
496def capitalize(s):
497 """capitalize(s) -> string
498
499 Return a copy of the string s with only its first character
500 capitalized.
501
502 """
503 return s.capitalize()
50def _capitalizeWords(s):
51 w = WORD_RE.sub(_capitalizeMatch, s)
52 w = WORD2_RE.sub("", w)
53 return w
255def capitalize_helper(string):
256 string_list = list(string)
257 string_list[0] = string_list[0].upper()
258 return "".join(string_list)
69def capitalize(self, sString):
70 return '%s%s' % (sString[0].capitalize(), sString[1:])

Related snippets