You are viewing a single comment's thread. Return to all comments →
My not one-liner solution in Python.
import re pattern = re.compile(r'^[A-Z]{5}\d{4}[A-Z]$') n = int(input()) for _ in range(n): pan_number = input() result = 'YES' if pattern.match(pan_number) else 'NO' print(result)
Seems like cookies are disabled on this browser, please enable them to open this website
Valid PAN format
You are viewing a single comment's thread. Return to all comments →
My not one-liner solution in Python.