Friday, January 17, 2025
HomeProgrammingWhat does the capitalize() method do in Python for strings?

What does the capitalize() method do in Python for strings?

The capitalize() method in Python converts the first character of a string to uppercase and makes all other characters lowercase. It ensures the string starts with a capital letter while the rest of the text remains in lowercase.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x