python print * if 0 and - if 1 code example
Example 1: if condition in print statement python
print (a if b else 0)
Example 2: if condition in print statement python
x = (a if b else 0)
print (a if b else 0)
x = (a if b else 0)