+ 1
In booleans ive confused
a=6==3+3 print (a) b=4==4 print (b) c=a+b print (c) output I've got was true true 2 why I've got 2 as my output......
2 Answers
+ 7
In Python, the booleans True and False are also equal to:
True = 1 and False = 0
When you use the "+" operator for c, Python is implicitly adding the integer values of True for a and b
+ 1
thanks dude