short circuit evaluation is used
for 'and' if first item is 0 result is 0 so
a and b results to a and b wont be evaluated if a is false(empty string,list etc)
a and b gives a if a is false and b otherwise
for or if first item is 1 result is 1 so
a or b gives a if a is true and b otherwise
Comments
Post a Comment