+ 1
how it is printing??
in console I wrote print('spams' and 'eggs...') and in output it is only printing eggs... why so?? can anybody explain it
5 Answers
+ 1
and operator first ands the two strings. for and operator, both strings are considered as true. hence it reads both and whichever string read latest is printed.
if u try this, print(0 and 'eggs') you will get output as 0. this is because when anding, whatever is anded with 0 will be 0. so string eggs are not read at all.
I think you got the answer.
+ 1
thank you @Sriniketha
0
print (Dec 2016)
0
Print
0
Fghojtuydkeshbmncvzzsde



