Asked By – TTT
In the Python console, when I type:
>>> "\n".join(['I', 'would', 'expect', 'multiple', 'lines'])
Though I’d expect to see such an output:
I would expect multiple lines
What am I missing here?
Now we will see solution for issue: Python – Join with newline
The console is printing the representation, not the string itself.
If you prefix with
See this question for details about the difference between a string and the string’s representation. Super-simplified, the representation is what you’d type in source code to get that string.