SyntaxFix
Write A Post
Hire A Developer
Questions
import re import sys prog = re.compile('([A-Z]\d+)+') while True: line = sys.stdin.readline() if not line: break if prog.match(line): print 'matched' else: print 'not matched'