If you can use “”” what’s the point of \n
So you want to know what's the point of using is \n if you can type multiline using """ without using \n Here are the things which \n can achieve 1.print(Hi, end='\n') --> the default end character in print() is the \n and not """ 2. Even the """ which you are taking about is stored as \n. Don't believe me run the following code in your python shell. >>> a =""" I am a multiline string""" >>> a Output: '\nI\nam\na\nmultiline\nstring' see """ uses \n \n is a newline character and it is officially a escape character in python . So your """ uses it to achieve the newline >>> print('\nI\nam\na\nmultiline\nstring') Output: I am a multiline string CONCLUSION: Note """ can only be used to create a newline in multiline string or comment. But \n can be used to create a newline at any place.
Got it! Thank you!
Ezra Demiss Great. I am glad that my answer helped you.