FAQ: Learn Python: Syntax - Concatenation


#1

This community-built FAQ covers the “Concatenation” 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 Concatenation

In the context of this exercise, how does string concatenation work?

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!


#2

The term ‘argument’ here is not defined? What’s an argument in the context of Python?


#3

An argument is simply a value provided to a function when you call it. Once you learn functions, I would search videos that talk about parameters and arguments (becoming comfortable with these terms earlier will help later). It will make more sense when you learn functions.

Essentially, just like the examples states : “we can pass a variable as an argument to…”
So string1 is an argument in this lesson.

Also questions that have to do definitions are really easy to find online. There are a lot of great resources!


#5

I understand Concatenation but I don’t see any strings to connect in this question. What am I supposed to connect together? When I click ‘solution’ nothing appears.
Thanks in advance


#6

Here’s how I see the exercise from my end:

We need to define message which is the concatenation of all those strings together and then print it.

And here’s the solution that worked for me:

I hope this helps.


#7

I had a fun time concatenating the strings pythonically using the following code:

message = “”

for item in range(6): message += eval(“string” + str(item + 1))

print(message)


#8

i made this but it won’t check the box even tho the message is displayed in the terminal on the right ? am i missing something ( this is for step 1 )


#9

this is the exact message (string) i came up with and the same result but it won’t let me proceed … EDIT i had full_message but you have to use just message or the stupid thing won’t work…smh