+ 16
How do I move to the next line in python console without executing.
6 Respostas
+ 9
The python interactive shell and console is good for running python instructions one at a time. To write an entire python program you need to use the file editor. To open the file editor: open python IDLE, select File -> New Window and type your code there.
+ 12
Thanks Thomas Williams
+ 12
Thanks HonFu
+ 4
The escape character '\n' indicates a newline
print("My name \n is Thomas")
Output:
My name
is Thomas
+ 4
'\n' to create a new line without being executed by a interpreter
+ 3
If you want to continue a line of code in the next line, you do it like this:
if 1==1 and 2!=3 \
and True!=False:
print('Whatever')