Discord
Login
Community
DARK THEME

A new line

How do I add a newline to a string ??

print (str1 + newLine + str2)
newLine = ???

The newline character is \n.

print("first line\nsecond line\nthird line")

Or

newLine = '\n'
print(str1 + newLine + str2)

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community