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 137 0
Python string swapcase 108 0
Python string title 109 0
Python string startswith 118 0
Python string replace 159 0
Python string translate 99 0
Python string rpartition 96 0
Python string partition 92 0
Python string splitlines 138 0
Python string rsplit 90 0
Python string split 90 0
Python string rindex 99 0
Python string rfind 121 0
Python string upper 95 0
Python string lower 97 0
Python string maketrans 104 0
Python string strip 95 0
Python string rstrip 115 0
Python string lstrip 96 0
Python string rjust 114 0
Python string ljust 113 0
Python string len 97 0
Python string join 92 0
Python string casefold 97 0
Python string isprintable 102 0
Python string encode 95 0
Python string isdecimal 101 0
Python string isidentifier 93 0
Python string isupper 96 0
Python string istitle 94 0
Python string isspace 115 0
Python string isnumeric 118 0
Python string isdigit 99 0
Python string islower 100 0
Python string isalpha 115 0
Python string isalnum 114 0
Python string index 103 0
Python string find 109 0
Python string expandtabs() 91 0
Python string endswith 109 0
Python string count 105 0
Python string capitalize 92 0
Python string center 96 0
Python string Introduction 115 0
Python string Template 160 0
Python string Formatter 169 0
Python string printable 246 0
Python string whitespace 163 0
Python string punctuation 119 0
Python string octdigits 104 0
Python string hexdigits 125 0
Python string digits 91 0
Python string ascii_letters 426 0
Python string ascii_lowercase 204 0
Python string ascii_uppercase 198 0
How to Create Download Manager in Python 771 0
Python random weibullvariate 185 0
python random paretovariate 151 0
Python random vonmisesvariate 198 0
Python random normalvariate 228 0
Python random lognormvariate 134 0
Python random gauss 142 0
Python random gammavariate 158 0
Python random expovariate 232 0
Python random betavariate 235 0
Python random triangular 128 0
Python random uniform 165 0
Python random random 129 0
Python random sample 213 0
Python random shuffle 198 0
Python random choices 277 0
Python random choice 180 0
Python random randint 165 0
Python random randrange 259 0
Python random getrandbits 167 0
Python random setstate 162 0
Python random getstate 207 0
Python random seed 185 1
Python random Introduction 193 0

Comments