Home > Backend Development > Python Tutorial > Introduction to python basics - upper

Introduction to python basics - upper

Y2J
Release: 2017-05-18 14:56:08
Original
2598 people have browsed it

Description

The Python upper() method converts lowercase letters in a string to uppercase letters.

Syntax

upper() method syntax:

str.upper()

Parameters

NA.

Return value

Returns a string of lowercase letters converted to uppercase letters.

Examples

The following examples show how to use upper()function:

#!/usr/bin/python
str = "this is string example....wow!!!";
print "str.upper() : ", str.upper()
Copy after login

The output results of the above examples are as follows:

str.upper() :  THIS IS STRING EXAMPLE....WOW!!!
Copy after login

【Related recommendations】

1. Python free video tutorial

2. How to convert uppercase and lowercase in python

3. Detailed explanation of the use of lower and upper functions in python

The above is the detailed content of Introduction to python basics - upper. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template