Lambda Function If Else In Python Definition Library