string.upper()
The upper() method returns the uppercased string from the given string. It converts all lowecase characters to uppercase.
If no lowercase characters exist, it returns the original string.
# example stringstring = "this should be uppercase!"print(string.upper())# string with numbers# all alphabets whould be lowercasestring = "Th!s Sh0uLd B3 uPp3rCas3!"print(string.upper())
# first stringfirstString = "python is awesome!"# second stringsecondString = "PyThOn Is AwEsOmE!"if(firstString.upper() == secondString.upper()):print("The strings are same.")else:print("The strings are not same.")
**********END OF ARTICLE **********
Comments