Python Passing Two Functions As Arguments