How to get the ASCII letters lowercase and uppercase in Python

4 Answers

0 votes
import string

print(string.ascii_letters)
 
'''
run:
  
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 
'''

 



answered Nov 8, 2018 by avibootz
0 votes
import string

print(string.ascii_lowercase)
 
'''
run:
  
abcdefghijklmnopqrstuvwxyz
 
'''

 



answered Nov 8, 2018 by avibootz
0 votes
import string

print(string.ascii_uppercase)
 
'''
run:
  
ABCDEFGHIJKLMNOPQRSTUVWXYZ

'''

 



answered Nov 8, 2018 by avibootz
0 votes
import string

print(string.ascii_letters[0])
print(string.ascii_letters[1])
print(string.ascii_letters[25])

'''
run:
  
a
b
z

'''

 



answered Nov 8, 2018 by avibootz
...