Eunice
asked

Expert
Abhilekh Gautam answered
The newline character \n is mostly used in strings to create line breaks. When you include \n in a string, it tells Python to start a new line.
For example:
print("Hello\nWorld!")
This will output:
Hello
World!
If you have any more questions, feel free to ask—I’m happy to assist!
Python
This question was asked as part of the Getting started with Python course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer