Python string ascii_letters














































Python string ascii_letters



Python String : ascii_letters


This article demonstrates how to use of string.ascii_letters.
In Python3, ascii_letters is a pre-initialized string used as string constant.
ascii_letters is basically concatenation of ascii_lowercase and ascii_uppercase string constants.


Syntax :

string.ascii_letters


Parameter Values :

Doesn't take any parameter, since it's not a function. 

Returns :

 Return all ASCII letters (both lower and upper case)


Sample Code :

# import string library function 
import string 

# Storing the value in variable result 
result = string.ascii_letters 

# Printing the value 
print(result) 

Output :
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 


The concatenation of the ascii_lowercase and ascii_uppercase constants described above. This value is not locale-dependent.


**********END OF ARTICLE **********


More Articles of Vishal Lodhi:

Name Views Likes
Python string zfill 92 0
Python string swapcase 80 0
Python string title 84 0
Python string startswith 89 0
Python string replace 134 0
Python string translate 72 0
Python string rpartition 76 0
Python string partition 66 0
Python string splitlines 95 0
Python string rsplit 65 0
Python string split 65 0
Python string rindex 73 0
Python string rfind 93 0
Python string upper 68 0
Python string lower 67 0
Python string maketrans 75 0
Python string strip 72 0
Python string rstrip 75 0
Python string lstrip 71 0
Python string rjust 81 0
Python string ljust 81 0
Python string len 70 0
Python string join 63 0
Python string casefold 68 0
Python string isprintable 70 0
Python string encode 68 0
Python string isdecimal 73 0
Python string isidentifier 65 0
Python string isupper 62 0
Python string istitle 69 0
Python string isspace 82 0
Python string isnumeric 87 0
Python string isdigit 68 0
Python string islower 72 0
Python string isalpha 82 0
Python string isalnum 78 0
Python string index 78 0
Python string find 82 0
Python string expandtabs() 73 0
Python string endswith 77 0
Python string count 72 0
Python string capitalize 64 0
Python string center 74 0
Python string Introduction 89 0
Python string Template 128 0
Python string Formatter 122 0
Python string printable 169 0
Python string whitespace 124 0
Python string punctuation 84 0
Python string octdigits 75 0
Python string hexdigits 89 0
Python string digits 68 0
Python string ascii_letters 260 0
Python string ascii_lowercase 116 0
Python string ascii_uppercase 121 0
How to Create Download Manager in Python 393 0
Python random weibullvariate 150 0
python random paretovariate 121 0
Python random vonmisesvariate 151 0
Python random normalvariate 158 0
Python random lognormvariate 102 0
Python random gauss 104 0
Python random gammavariate 112 0
Python random expovariate 165 0
Python random betavariate 148 0
Python random triangular 103 0
Python random uniform 129 0
Python random random 108 0
Python random sample 160 0
Python random shuffle 168 0
Python random choices 188 0
Python random choice 151 0
Python random randint 134 0
Python random randrange 182 0
Python random getrandbits 127 0
Python random setstate 121 0
Python random getstate 160 0
Python random seed 158 1
Python random Introduction 158 0

Comments