Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

mahdi messai
119 Pointspython strings quiz
Hello i was learning some python when i stumbled upon this quiz it should be like this
name = "mahdi"
subject = "Treehouse loves {}".format(name))
print(subject)
4 Answers

mahdi messai
119 PointsYou need to use a +
to combine the string and name
.
Still looking for an answer

Antonio De Rose
20,882 Pointsname = "mahdi"
subject = "Treehouse loves " + name

mahdi messai
119 Pointsthanks passed but was my code wrong ?

Antonio De Rose
20,882 Pointsjust as I mentioned earlier your code was right, see now, there are many ways in coding to solve a single same problem, you have solved in a way, but the question, over here has specifically, asked in a way, you have not done, otherwise, your coding is completely correct, except for that additional brace at the end.

mahdi messai
119 Pointsalright thank you
Antonio De Rose
20,882 PointsAntonio De Rose
20,882 Pointsgenerally speaking, your code would work, if you do like, as you did above except for the additional brace.
however, the given task, does not like, if you did it as such as it is asking you to use the concatenation operator