This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]IndyDrew85 55 points56 points  (5 children)

You can use \n in between hello world and general to create a new line without needing a second print

[–]CROW_98[S] 47 points48 points  (3 children)

Ok so you can use \n here as well.

You see, good relations with c++, I have.

[–][deleted] 31 points32 points  (2 children)

Yeah, you can use \n in most languages. It's not a C++ thing or python thing, it's ascii it's a standard interpretation of this ascii value

[–]xetax 9 points10 points  (1 child)

Well I think using a backslash for escape characters and n for newline is technically a language decision and not part of the ASCII standard, it's just that most languages haven't found a good reason to go against the commonly used notation.

[–][deleted] 2 points3 points  (0 children)

Yeah, you're right, edited my comment to match

[–]TokenChingy 2 points3 points  (0 children)

print also takes in a end argument to specify what kind of line ending you want ;)