is alphabet python code example

Example 1: is alphabet python

test = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
test.isalpha()
# This will return True if all chars in string are from a-z or A-Z and Flase in all other cases

Example 2: alphabet python

['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

Example 3: isaplha in python

str = "abc"
print(str.isalpha())

Example 4: alphabet python

for i in range(ord('a'), ord('z') + 1):
  print(chr(i))
  # prints all letters in english the alphabet