Python Lambda Function If Statement