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.
Great! Finally, make a variable named greeting where you join greeting_list back into a string, separated by spaces. You should end up with "Hi, I'm <your first name>" as the value of greeting. cant seem to get it
full_name = "chey pettitt" name_list = full_name.split(" ") greeting_list = "Hi, I'm chey".split(" ") greeting = .join("greeting_list")
What variables are you starting with? Do you mean like this:
In : greeting_list = "Hi, I'm chey".split(" ")
In : greeting_list Out: ['Hi,', "I'm", 'chey']
In : space = " "
In : greeting = space.join(greeting_list)
In : greeting Out: "Hi, I'm chey"
Do you mean like this:
In : greeting = "Hi, I'm " + full_name
In : greeting Out: "Hi, I'm chey pettitt"
Or do you need to take a list of strings and construct the sentence?
got it!! must be getting confused to set the same values i just added same string so;
greeting = "Hi, I'm chey"
thats a better sum of events i could do it that way thanks ryan
Glad I could help