+ 2
How to leave a line in python
2 ответов
+ 2
print("Who goes there?\n")
print("Me")
I gave \n for a blank line. Assuming that's what he wanted
+ 3
I'm not sure what "leave a line" means. Technically, you don't even need to end a print statement with '\n' because each print statement will automatically end with a line break. So appending '\n' will lead to a double line break (i.e. a blank line).
It looks like in one of your codes, you don't end if statements with a colon (:). They are supposed to look like this:
if condition: # note the colon
do_something()
Is that what you're talking about?