changeset 985 | c7e944977e39 |
parent 753 | d94fdbef1a4f |
984:32eead4cd30e | 985:c7e944977e39 |
---|---|
14 # counter n given on the command line |
14 # counter n given on the command line |
15 cn = sys.argv[1] |
15 cn = sys.argv[1] |
16 |
16 |
17 # calling the matching function |
17 # calling the matching function |
18 s = ("a" * int(cn)) |
18 s = ("a" * int(cn)) |
19 m = re.match('(a*)*b' , s) |
19 m = re.fullmatch('(a*)*b' , s) |
20 |
20 |
21 print(s) |
21 print(s) |
22 print(m) |
22 print(bool(m)) |