0
Why would int("3"+"4") be 34 and not 7?
Please help I am a little confused. Also does int stand for integer?
6 Respostas
+ 15
Expressions inside parantheses are evaluated first. So, int("3" + "4") = int("34") = 34.
+ 5
x=int("3")+int("4")
print(x)
then output is 7.
+ 1
+ is used to concatenate in Python
+ 1
and yes int stans for integer :p
0
"3" is taken as a part of a series of numbers
example: --> "1" + "2" +"3" at the end you will get
=123
- 1
irrespective of type + is used for concatenation..hence 34