Can we code a line below the line in a print function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we code a line below the line in a print function?

Doubt

12th Aug 2021, 4:13 AM
Abdul
Abdul - avatar
4 Answers
+ 1
Line below the line? I'm not sure what you mean. You can make a line break in a print statement using "\n". So e.g. print("First line\nSecond line") Will produce a two line output: First line Second line Is this what you wanted to know?
12th Aug 2021, 4:21 AM
Simon Sauter
Simon Sauter - avatar
+ 2
not sure if this is what you mean, but you can print multiple lines in a single print statement by including the newline character \n print('first\nsecond')
12th Aug 2021, 4:21 AM
Tibor Santa
Tibor Santa - avatar
0
didn't get what you're talking
12th Aug 2021, 4:20 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
I see you're doing the Python for Beginners course. This is explained in lesson 10.1.
12th Aug 2021, 4:24 AM
Simon Sauter
Simon Sauter - avatar