Hello, Suppose we want some block of code to be executed when both '*a'* and '*b'*are equal to say 5. Then we can write like :
*if a == 5 and b == 5:* * # do something* But a few days ago, I just involuntarily wrote a similar condition check as : *if a == b and b == 5:* * # do something * which made me think, is there any difference between the two ? Is there any difference, any difference in the process of evaluation or execution ? and also which one is the better ? I think this is a general programming question and not specifically for python. P.S. : Newbie here :) Thanks. Regards, Vipul Sharma
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor