Concat string


In the review the last line of the solution is:

print(“I got “+ str(point_total)+” points!”)

What tripped me up is the space between got and the apostrophes and again the space between the apostrophes and points. Obviously I’m just going to have to remember to do that in the future but is there a logical reason for these spaces?

FAQ: Learn Python – Python Syntax – Review

well, lets say point_total is 5, without the spaces you would get:

i got5points!

which isn’t very readable. Not very nice for people using your application.