Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@djadmin
Created August 23, 2013 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djadmin/6316340 to your computer and use it in GitHub Desktop.
Save djadmin/6316340 to your computer and use it in GitHub Desktop.
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