Using If In Lambda Function In Python With If Statement