Skip to content

Python code snippet – How to use if else in lambda ?

lambda x: True if x % 2 == 0 else False
See also  Python code snippet - How to end an infinite loop in specific time ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.