if condition: value = true-expr else: value = false-expr # The same can be written in single line: value = true-expr if condition else false-expr