Using If In Lambda Function Python Example