# DS051023 (Regular expressions)

Write a python program to check the validity of a pancard.

PANCARD = “ABCDY1234D”

VALID PATTERN : First 5 alphabets, next four digits and one alphabet at the end.

pancard = input (“Enter the pancard”)
pattern = “[A-Z]{5}\d{4}[A-Z]{1}”
find = re.findall(pattern, pancard)
if find:
print(“A valid pancard”)
else:
print(“Not a valid pancard”)