When I execute the following code on IPython Notebook, the character string is displayed as it is and no line breaks occur.
msg = 'test\ntest\ntest\n'
msg
>>> 'test\ntest\ntest\n'
If you print () as shown below, it will be displayed with a line break.
msg = 'test\ntest\ntest\n'
print(msg)
>>> test
>>> test
>>> test
By the way, when I'm trying to display the classification result using sklearn's classification_report () function, this problem? I fell into.
I didn't find such basic things in tutorials, and I didn't know what to look for, so I wasted about 15 minutes. .. ..
Recommended Posts