0
Anyone please answer how this coding works ??? Because in the first two lines two if statement lies and the output is else
if 1+1==2: if 2*2==8: print('if') else: print('else')
1 Answer
+ 1
Look, the first if condition is true.. So, it enters into the if.. And again checks the condition which is false... According to your code it doesn't print anything...
In case, if you write the code like below, you'll get o/p as else(else block gets executed)
if 1+1==2:
if 2*2==8:
print('if')
else:
print('else')