Python Format Execute Function Python Code