+ versus ,

Wading deeper into learning Python 3. I am noticing an inconsistency in print( ) coding that I would appreciate clarification on. It seems that sometimes I can code something like the below and using either + or , are fine …

while index < length:
print("I am learning about " + python_topics[index])
index += 1

OR

while index < length:
print("I am learning about ", python_topics[index])
index += 1

Using either + or , to combine the string produces the same output. But I know in previous exercises in other lessons, when I’ve tried to use + to combine different things to print, I’ll get an Error statement that says …

TypeError: must be str, not int …

and if I print the same code again but swap out the + for a , symbol, it’ll be fine. Do you know what I mean? Sorry I can’t think of a specific example.

print can have multiple arguments in Python 3 (but not Python 2)
The default is that the output printed to the console will be the arguments used when calling the print function, with spaces in between.

These would produce the same output showing up on the screen:

print(3, "tons", "of cherries")
print(str(3) + " tons" + " of cherries")