Newline | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Newline

Hi I'm learning python in notepad++, currently on Strings.. how to make newline for string in python console window.. when I press enter for newline it runs instead of making newline..

17th Jul 2017, 12:41 AM
Gaurav Dubey
Gaurav Dubey - avatar
3 Answers
+ 9
newline in strings is \n print("here is an \nexample") but if you're using notepad++, why use the console? just run your program after you write it in notepad++.
17th Jul 2017, 1:20 AM
Ahri Fox
Ahri Fox - avatar
0
bcoz when you write in doubt quotes in console window the output will show in single quote... and for same thing in double quotes with adding new line to a sentence is done by pressing enter other than using \n button.. but when i press enter it runs that string other than making newline for rest of sentence...
18th Jul 2017, 3:19 PM
Gaurav Dubey
Gaurav Dubey - avatar
0
if you don't understand what im talking about just go to Python 3 tutorial>Basic Concepts>Strings.
18th Jul 2017, 3:26 PM
Gaurav Dubey
Gaurav Dubey - avatar