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 determine project parent dir?

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.