if x.startswith(("a", "b")) or re.match(r"a\.b", x): pass