📚

ASCII Art

Printing on Multiple Lines

So far, each

print()
has produced one line of output. That's because
print()
automatically moves to the next line after it finishes.

If you want to display something across several lines (like a picture made of text), you have two options:

Option 1: Multiple print() calls

Each

print()
creates one line:

print("  *  ")
print(" *** ")
print("*****")
# →   *
# →  ***
# → *****

Option 2: The \n character

Inside a string,

\n
is a special code that means "start a new line here":

print("Line 1\nLine 2\nLine 3")
# → Line 1
# → Line 2
# → Line 3

It looks like two characters (

\
and
n
), but Python treats them as one — a newline.

About Backslashes

The

\
character is special in Python — it's used to create these special codes. If you actually want to print a backslash (like in ASCII art), you need to type it twice:
\\\

print("\\")   # → prints one backslash: \
💡

💡 Tip: For this exercise, using multiple

print()
calls (one per line) is the simplest approach!

main.pySandbox
main.py