Lambda Function With If In Python