Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python Data Types String concatenation

Raj Aryan
Raj Aryan
161 Points

I want you to help me make a string to use for an email greeting. To start, we need a variable named name that's assigne

I want you to help me make a string to use for an email greeting. To start, we need a variable named name that's assigned to your name. Deja vu, huh?

strings.py

Keenan Johnson
Keenan Johnson
13,841 Points

Hi Raj,

What issue are you having with this particular challenge?

Raj Aryan
Raj Aryan
161 Points

Hi Keenan Johnson , Thank You for your response. I have got the answer form Dmitry Bruhanov. Hope you will help me future :)

2 Answers

Dmitry Bruhanov
Dmitry Bruhanov
8,513 Points

Hey, Raj! The challenge consists of two parts:

In the first one simply create a variable called name and assign your name in a string format as its value.

In the second part create another variable and assign it with a string, but instead of your name put a place holder {} right inside the string. Then, after the last inverted commas put a period and type: .format() in the brackets type your name variable. The .format() function will insert the string from your variable called name into the formated string where you put the place holder.

Press the Check work button. Everything should work properly. Let me know if you have further problems with this challenge. Good luck!

Raj Aryan
Raj Aryan
161 Points

Hello Dmitry Bruhanov, Thank You for your response.

Dmitry Bruhanov
Dmitry Bruhanov
8,513 Points

Good time of the day, Raj! Thanks for giving me the 'best answer' mark. Hope, I'll soon become a professional coder! Good luck!