Python String capitalize() Method
This function capitalizes the first character in a string. The character must be a letter a through z.
Syntax
Python
Copy Code
string.capitalize()
Example
Python
Copy Code
print('abc'.capitalize()) print('Abc'.capitalize()) print('1abc'.capitalize())
Output
Abc Abc 1abc