Strings Not Getting Added Properly

There is an example in the prompt here that I believe is incorrect:

number1 = “100”
number2 = “10”

string_addition = number1 + number2
#string_addition now has a value of “10010”

Why would string_addition not be 110?
This is also the result when you run the code

Hi @ls7891,

Adding two strings together concatenates them, even if the contents of the strings are numbers. So the behavior you’re observing is correct.

>>> "100" + "10"

Will work the same as:

>>> "lorem" + " ipsum"
'lorem ipsum'

If you want to get the total of two numbers, you need to use integers for the addition, rather than strings:

>>> 100 + 10
>>> int("100") + int("10")