0d: 00h: 00m: 00s

🎁 Get 3 extra months of learning β€” completely FREE

That's 90 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 3 extra months of learning completely FREE

Become a PRO
irin shaiju
last year
Irincountry asked

What is the use of multi-line strings?

Palistha Singh
Expert
last year

In Python, multi-line strings are used when you want to store or display text that spans across multiple lines β€” instead of just one.
You define a multi-line string using triple quotes (''' or """).

Example:

message = """Hello!
Welcome to Python programming.
This is a multi-line string."""
print(message)

Output:

Hello!
Welcome to Python programming.
This is a multi-line string.

If you have more questions, I’m here to help β€” feel free to ask anytime!

This question was asked as part of the course.