capital letter python code example
Example 1: capitalize string python
string = "this isn't a #Standard Sntence."
string.capitalize()
string.upper()
string.lower()
string.title()
from string import capwords
string = capwords(string)
string = " ".join(s.capitalize() for s in string.split())
Example 2: python to uppercase
text = "Random String"
text = text.upper()
text = upper(text)
print(text)
>> "RANDOM STRING"
Example 3: how do you change a string to only uppercase in python
original = Hello, World!
upper = original.upper()
upper = upper(original)
Example 4: python capitalize the entire string
message="hi"
print(message)
print(message.upper())