Created
November 20, 2016 18:04
-
-
Save arsho/6ce176810360ee622b7c35cc5c7c5429 to your computer and use it in GitHub Desktop.
Using regular expression to allow only a to z and A to Z letters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
word = input() | |
if(re.match(r'^[a-zA-Z]+$',word)): | |
print("matched") | |
else: | |
print("not matched") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment