Mar-09-2017, 09:47 PM
Because you loop over each element of an iterable and print it. In this case, this is a string. A print function adds a new line character at the end.
Just print it
Just print it
>>> string="This is sentence 1.\nThs is sentence 2.\n" >>> print(string) This is sentence 1. Ths is sentence 2.