You are viewing a single comment's thread. Return to all comments →
import re s=input() print (bool(re.match(r'^[1-9][\d]{5}$',s) and len(re.findall(r'(\d)(?=\d\1)',s))<2 ))
Seems like cookies are disabled on this browser, please enable them to open this website
Validating Postal Codes
You are viewing a single comment's thread. Return to all comments →