import repm = re.compile(r".*dog")has = pm.match("i love dogasdf")if has: print("dog at the end")else: print("Not at the end")
Standard input is empty
dog at the end
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!