We don’t have ?: in Python, but we have can implement it in this format: [on true] if [expression] else [on false]
If the expression is True, the statement under [on true] is executed. Else, that under [on false] is executed.
Example:
a, b = 2, 3
min = a if a<b else b
print(min)