range of alphabets in python code example
Example 1: alphabet list python
#Python: premade alphabet string
import string
string.ascii_lowercase
#output: 'abcdefghijklmnopqrstuvwxyz'
string.ascii_uppercase
#output: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
Example 2: python range of letters
a = ord('a')
alph = [chr(i) for i in range(a, a+26)]
Example 3: range of letters python
for i in range(ord('a'), ord('z') + 1):
print(chr(i))
# prints all letters in english the alphabet