+ 1

in the lesson, a question have been asked about the output of int("3"+"4") and the answer is 34.but it has no output..

in the code section int("3"+"4") has no output. but in the lesson it says 34. so which thing has the fault? the console or the lesson question?

26th Sep 2018, 6:40 PM
Mahian Ahmed
Mahian Ahmed - avatar
2 ответов
+ 3
You also need to print it, if you want to see it in the console
26th Sep 2018, 6:49 PM
Matthias
Matthias - avatar
+ 2
String concatenation of "3" and "4" happens first. Then the string becomes a number via the int() method
26th Sep 2018, 6:47 PM
Steven M
Steven M - avatar