In Python3 ascii_uppercase
— it is a pre-initialized string used as a string constant. In Python, the string ascii_uppercase
will capitalize & # 39; ABCDEFGHIJKLMNOPQRSTUVWXYZ & # 39 ;.
Syntax: string.ascii_uppercase
Parameters: Doesn’t take any parameter, since it’s not a function.
Returns: Return all uppercase letters.
Note. Make sure to import the string library function to use ascii_lowercase.
Code # 1:
|
Output:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Code # 2: This code checks if the line input contains only upper ASCII characters.
|
Exit:
GeeksForGeeks -" False GEEKS FOR GEEKS -" False GEEKSFORGEEKS -" True
Applications:
String constant ascii_uppercase
can be used in many practical applications zheniyah. Let’s see some code explaining how to use ascii_uppercase
to generate strong random passwords of a given size.
|
Exit :
TR2ESZAJOT