the PHP ternary operator equivalent on Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Crespo

    #1

    the PHP ternary operator equivalent on Python

    Hi!

    I would like to know how can I do the PHP ternary operator/statement
    (... ? ... : ...) in Python...

    I want to something like:

    a = {'Huge': (quantity>90) ? True : False}

    Any suggestions?

    Thanks

    Daniel

Working...