Apr-05-2020, 04:20 PM
Hi,
The following 2 codes yield the same results.
What's the difference between them? If the first one is the traditional way of coding, what's the second? I'm puzzled.
TIA
The following 2 codes yield the same results.
What's the difference between them? If the first one is the traditional way of coding, what's the second? I'm puzzled.
TIA
a=1 if(a==1): p=8 else: p=9 print(p)
a = 1 print(8 if(a==1) else 9)