Defining Lambda Function Python