| changeset 984 | be2d568644f6 |
| parent 753 | 30ea6b01db46 |
| 983:d94532448ec8 | 984:be2d568644f6 |
|---|---|
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)) |