0
_var = ( "a b c" "d e f" "g h k")
print(_var)
print(type(_var))

I was wondering why is this of type string and why is it concatenated. I was also wondering why parenthesis are used to make this collection. I encountered this code block and was curious.

Alan Wong
  • 25
  • 5
  • String literals seperated by whitespace are automatically concatenated when the code is compiled. So `x = "Hello " " world"` would give you `x == "Hello world"`. The parentheses don't do anything in this case, they are just unnecessary grouping parentheses. They are superfluous here and can be removed – juanpa.arrivillaga Mar 03 '22 at 08:06

0 Answers0