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 (Retired) Shopping List Lists and Strings

Forrest Nunnelee
Forrest Nunnelee
604 Points

it says your name_list's last item shouldn't be in your greeting variable. My code

The only thing I can think to do is ' '.join(greeting_list). Please help

greeting_list.py
full_name = 'Forrest Nunnelee'
name_list = full_name.split()
greeting_list = "Hi, I'm {}".format(full_name).split()
greeting = ' '.join(greeting_list)

2 Answers

Charlie Thomas
Charlie Thomas
40,856 Points

Your problem is your use of the full_name variable in the format method. It only wants your first name so use name_list[0] Here is my code that passes:

full_name = "Charles Thomas"
name_list = full_name.split()
greeting_list = "Hi, I'm {}".format(name_list[0]).split()
greeting = " ".join(greeting_list)