Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
The inner most brackets will be evaluated first. You are adding two strings. "2" and "3". So the output will be a string "23". After that you are converting that string "23" to int. If you change it the other way print (int("2")+int("3")), you will get the output as 5. Because now you are converting the strings to integer first and then adding them.
4th Apr 2020, 2:26 PM
Abirame Dhevendran
Abirame Dhevendran - avatar