FAQ: Learn Python: Syntax - Multi-line Strings

This community-built FAQ covers the “Multi-line Strings” exercise from the lesson “Learn Python: Syntax”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Computer Science
Data Science

FAQs on the exercise Multi-line Strings

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

3 posts were split to a new topic: How to create a multiline string in the editor?

2 posts were split to a new topic: I cannot enter the required quotation marks?

2 posts were split to a new topic: How does my code differ from the solution?

2 posts were split to a new topic: Why do I get an indentation error?

2 posts were split to a new topic: Why do I need to learn the basics?

A post was split to a new topic: Can we perform the same operations on multi-line strings that we perform on other strings?

In this lesson about using “”" for multiline strings - i did the following:

Assign the string here

to_you = “”“if you passing meet me and desire to speak to me, why
should you not speak to me?
And why should I not speak to you?”""


And I get a message on the bottom saying:

Did you set to_you to the given Whitman poem?

How do I set ‘to_you’ to the given Whitman poem if not the way I did it above?
I’d like to get this right and move on to the next lesson.
Thanks in advance for your helpl

It looks like you’re missing the first word, "Stranger," in the string.

Welcome to the forums!

I noticed that later. Thanks, @victoria_dr !

1 Like

Why ever use single or double quotes over triple quotes?

1 Like