Skip to content

Instantly share code, notes, and snippets.

Created Oct 31, 2017

What would you like to do?
import string
# Hint: Use these string constants to ignore capitalization and/or punctuation
string.ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
string.ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
string.ascii_letters = string.ascii_lowercase + string.ascii_uppercase
def ascii_letters(text):
#This m ethod will return True if the string
# is an uppercase or lowercase letter from A to Z.
# If the string contains any non-letter characters, then it will return False.
for index in text:
if index in string.ascii_letters:
return True
return False
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.