Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HackerRank Validate PAN Format Problem https://www.hackerrank.com/challenges/valid-pan-format
import re
for i in xrange(input()):
pan=str(raw_input())
if re.search(r'[A-Z]{5}[0-9]{4}[A-Z]',pan):
print 'YES'
else:
print 'NO'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment