Construct and Test a Regular Expression
Construct a regular expression matching strings that consist of one or more a characters followed by exactly one b (e.g. "ab", "aab", "aaab" should match; "b", "a", "abb" should not match).
Read the number of test strings, then that many strings, and print "Match" or "No match" for each, testing your pattern against the entire string (use re.fullmatch).
main.py
Loading editor…
Console
Run your code to see output here.