Function Returning Another Function In Python Syntax For Input