Make First Letter Uppercase and the Rest Lowercase in a String using Python

capitalize method

text = 'hello WORLD'
result = text.capitalize()

print(result)  # Hello world

Leave a Comment

Cancel reply

Your email address will not be published.