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

what is wrong with this code:

full_name = "Said Aden" name_list=list(full_name.split()) greeting_list="Hi,i'm Treehouse" greeting_list=list(greeting_list.split())

greeting_list.py
full_name = "Said Aden"
name_list=list(full_name.split())
greeting_list="Hi,i'm Treehouse"
greeting_list=list(greeting_list.split())

2 Answers

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 48,850 Points

Hi aden

You may need to add a space between the comma and I in your greeting (also make sure the I is upper-cased). The way you have it now the list will have two items; with the extra space you will have three items.

Additionally, you shouldn't need the calls to list(). When you call split() on a string it returns an array.

Thanks Clayton,