Python3 upper() Method | Tutorial
Python 3 Tutorial
Python3 Advanced Tutorial
Python3.x Python3 upper() Method
Description
The Python upper() method converts all lowercase characters in a string to uppercase.
Syntax
The syntax for the upper() method is:
str.upper()
Parameters
- NA.
Return Value
Returns the string with all lowercase characters converted to uppercase.
Example
The following example demonstrates the usage of the upper() function:
#!/usr/bin/python3
str = "this is string example from tutorial....wow!!!";
print ("str.upper() : ", str.upper())
The output of the above example is as follows:
str.upper() : THIS IS STRING EXAMPLE FROM TUTORIAL....WOW!!!
ByteArk Coding Plan supports mainstream large models like Doubao, GLM, DeepSeek, Kimi, and MiniMax. Officially supplied, stable and reliable. Β₯9.9/month
iFlytek Star Coding Plan includes free model call quotas for DeepSeek, GLM, Kimi, and MiniMax. One-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now
YouTip