using 'and' 'or' with string in python

 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


Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

fix idm integration on chrome

Hidden Wiki