Skip to content

Python code snippet – How to write if statement in one line ?

visitorScore = res[3] if res[4] is not None else ""
See also  Python code snippet - How to use a variable to trigger an event?

Leave a Reply

Your email address will not be published.

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