var number = 1; var string = "The number is " + number + ".";
string would then be read as “The number is 1.”
In Python though, you’d have to do a little bit more.
number = 1 string = "The number is " + str(number) + "."
You have to convert the variable into a string manually. Why couldn’t Python do the same thing in its interpreter? It’s not like you could do that in any other way, so it’s arbitrary. Unless someone can share with me how this rule be in any way helpful? After all, I’m just starting in Python, there might be a good reason for this difference.