Python String capitalize() Method
You are Here:
Python String capitalize()
The capitalize()
method converts the first character of a string to capital (uppercase) letter.
If the string has its first character as capital (uppercase), then it returns the original string.
Example
Python Compiler
txt = "wikimass.com is for programmers"
x = txt.capitalize()
print(x)
Output
Wikimass.com is for programmers
Syntax
txt.capitalize()
Parameter Value
No parameters
Return Value
Value | Explanation |
---|---|
String | Returns a string where the first character is uppercase. |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on Python with examples for quick and easy learning.
We are working to cover every Single Concept in Python.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.