Python String upper method with Example – Python Tutorial

1 year ago Lalit Bhagtani 0

 In this tutorial, we will learn about python string upper method.
Python String Upper

upper method :

This method returns a copy of the string in which all the cased characters are converted to uppercase.

Syntax : < String Object >.upper( ) :  < String Object >


[datacamp_exercise lang=”python” height=”250″ min-height=”200″ max-height=”300″]

# create one string and assign it to variable s
s = ‘upper’

# call upper() method on string s
output = s.upper()

# print the value of variable output


References :-

  1. upper() method Docs

That’s all for Python String upper method. If you liked it, please share your thoughts in comments section and share it with others too.