Use the capitalize()
method to convert to upper case only the first character in a string.
The rest of the string is converted to lower case.
text = 'this is a regular text'
print(text.capitalize())
#This is a regular text
text = 'THIS IS A REGULAR TEXT'
print(text.capitalize())
#This is a regular text
text = 'THIS $ 1S @ A R3GULAR TEXT!'
print(text.capitalize())
#This $ 1s @ a r3gular text!
text = '3THIS $ 1S @ A R3GULAR TEXT!'
print(text.capitalize())
#3this $ 1s @ a r3gular text!
Notice that any character counts, such as a number or a special character, thus, in the last example, 3
is the first character and suffers no alterations while the rest of the string is converted to lower case.