Content · Programming · Python

Python First Exercises: Display Multiple Lines of Text

Displaying multiple lines teaches you how Python statements execute in order and how print creates line breaks. Learn the essential ideas and try a practical example.

2 views Published Oct 17, 2026 Updated Oct 18, 2026 Admin

Displaying multiple lines teaches you how Python statements execute in order and how print creates line breaks.

Understanding the Concept


Use separate print calls for a simple message or pass a newline character inside a string when appropriate. By default, print appends a newline after each call. Line breaks are part of the output format, not separate file lines in your code. You can change print behavior later using optional arguments such as end.

When and Why You Would Use This


Imagine producing a small receipt. Three lines are easier to read than one long sentence. Run the example and compare the physical code lines with what appears in the console.

Practical Example


print("Store: Corner Market")
print("Item: Notebook")
print("Total: 9")

Understanding the Example


The output contains three lines in the same order. Nothing in this example requires loops, special output libraries, or file creation.

Example Output


Store: Corner Market
Item: Notebook
Total: 9

Try It Yourself


Create a four-line introduction card containing a name, city, goal, and favorite subject.

Common Beginner Mistakes


  • Expecting multiple print calls to appear on the same line by default.
  • Typing a literal backslash-n when you intended a real newline inside a string.
  • Confusing a line of source code with a line in printed output.

Key Takeaways


  • Each print call normally ends with a newline.
  • Consecutive statements execute in order.
  • Readable output is part of good program design.
Share this resourceSend this page to someone who may find it useful.