Concatenating with commas error


Unsure why this has extra commas? Can anyone explain?

  • Ricky

First post, still new, Thanks for help!
edit: Is it because of how I defined the variable? Do the commas become a part of the code unlike when just doing the print()?
edit2: Couldnt be because without the commas it becomes a syntax error and when subbing the commas for addition signs it works properly just curious of the diff between using commas to concatenate compared to using the addition symbol to concatenate.

The commas are delimiters in the message tuple, a sequential, comma separated data structure. You could consider iterating over the tuple and printing each string that way.

5 Likes

Just to add to @mtf’s response, tuples are similar to lists, however they can’t be mutated; they’re immutable.

5 Likes