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 trialTristan bradford
1,123 PointsHow come my answer is wrong?
I tried this code in a different IDE and it worked just fine when I printed it, but I feel like I'm missing something small here.
full_name = "Tristan Bradford"
name_list = full_name.split()
greeting_list = "Hi, I'm " + name_list[0]
3 Answers
Cory Madden
7,120 Pointsgreeting_list is supposed to be a list, but you're making it a string.
Bryan Manhollan
Courses Plus Student 7,863 PointsMake use of .format after the string in order to change the name. Then use split() to make it a list.
Tristan bradford
1,123 PointsI made full list 0 = greedings list 2 and it worked. Thank you for the help everyone!
Bryan Manhollan
Courses Plus Student 7,863 PointsThe best way to do it would be
greeting_list = "Hi, I'm {}".format(name_list[0]).split()
Glad you got it to work.