New course! Every coder should learn Generative AI!
Try a free lesson+ 1
What make "\n\n" ?
5 Answers
+ 19
\n is a Python literal which is ASCII Linefeed (LF) it means a newline in a string. :D
+ 5
"\n" means a new line, so "\n\n" us two new lines.
>>> print("n\n\nn")
n
n
+ 5
You are right guy's I made a mistake with the /* it is kind of confusing while trying to get some basics with more then 2 different languages. ...
+ 4
@Ahmed, with \n you start end or end a comment or text line that includes explanation for example. This way you will be able to read the code better in case you encounter an error...
+ 1
when printing a string the interpreter needs instructions for certain values. the "\" is the escape character so the interpreter knows to process the next characters as an ASCII sequence or code or even character. '\n' is the escape code for "newline" so "\n\n" equals two new lines as if you had pressed "Return" or "Enter" twice.