upper() function in python by R4R Team

- upper() is a python string function which convert the given string into the uppercase letters.

Example

string is "my string"
required string is "MY STRING"

string is "Worning123"
required string is "WORNING123"


program-


print("Enter string")
s=input()
s=s.upper()
print("String in Upper case is ",s)

s="mytext"
print(s.upper())
s="mytext123"
print(s.upper())


output-


Enter string
this is string
String in Upper case is THIS IS STRING
MYTEXT
MYTEXT123


-In this program, firstly we take input of string in lowercase and using s.upper() we convert lowercase string into uppercase string and again stored and print that string.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!