How to capitalize first letter of each word in a String in Python - Java @ Desk

Thursday, January 2, 2025

How to capitalize first letter of each word in a String in Python

str = 'capitalize first letter of each word in a String';
print(str.title())

Output -
Capitalize First Letter Of Each Word In A String

Process finished with exit code 0







No comments:

Post a Comment