Return if the PAN Card number matched the ReGex
if ( re . search ( p , panCardNo ) and len ( panCardNo ) == 10 ) : NEW_LINE INDENT return True NEW_LINE DEDENT else : NEW_LINE INDENT return False NEW_LINE DEDENT