0
How to spot 1+1=11 or 1+1=2
Well when i started doing python course where was print("1"+"1")When can i know that it is 2 or 11?This really confuses me
3 Answers
+ 2
If it is in " " , it is a string. adding strings in python places one following the other. This is why "1"+"1" = 11.. It's not really the number 11, it is the string "11".
"1"+"1" = "11" .. Strings
1+1=2 .. integers
0
1+"1"= Error !
0
ok i know now thx!