progs/catastrophic.py
changeset 411 1aec0e1fda86
parent 93 4794759139ea
child 420 25bc57b32efa
equal deleted inserted replaced
410:3e1b8266ea65 411:1aec0e1fda86
       
     1 #!/usr/bin/env python
       
     2 import re
       
     3 import sys
       
     4 
       
     5 cn = sys.argv[1]
       
     6 
       
     7 r1 = '((a?){%s})' % cn
       
     8 r2 = 'a{%s}' % cn
       
     9 
       
    10 m = re.match(r1 + r2 , "a" * int(cn)) 
       
    11 
       
    12 print m.group(0)