Python‎ > ‎string constants‎ > ‎

string.ascii_uppercase

http://www.adilwaseem.com/

Introduction
Return with the letters in uppercase.

Syntax
string.ascii_uppercase

Parameters
None

Import module
Importing module is required in the Shell window and the Editor window.

Examples
The method returns with:
 >>> import string
>>> string.ascii_uppercase
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>>

Letters in uppercase are printed through if statement.
 import string
search1=str(input("Type your search: "))
if search1=="uppercase alphabets" or "English uppercase letter" or "uppercase letters" or "alphabets":
print(string.ascii_uppercase)
>>>
Type your search: uppercase
ABCDEFGHIJKLMNOPQRSTUVWXYZ
>>>

Comments