Lambda Function In Python Using If