Answers for "convert string to caps python"

26

python to uppercase

text = "Random String"
text = text.upper() #Can also do 
text = upper(text)
print(text)

>> "RANDOM STRING"
Posted by: Guest on September-16-2020
1

python convert string to sentence case

>>> s="OPERATOR FAIL TO PROPERLY REMOVE SOLID WASTE"
>>> s.capitalize()
Posted by: Guest on April-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language