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 trialMichelle Mangwiro
Courses Plus Student 467 PointsShopping list
I don't understand where I am going wrong again. Please explain in the most simplest way , as I am 13. I know my last line is wrong, but I don't understand how to split.
full_name = "Michelle Mangwiro"
name_list = full_name.split()
greeting_list = "Hi, I'm Treehouse"
my_sentence.split()
1 Answer
Andreas cormack
Python Web Development Techdegree Graduate 33,011 PointsHi Michelle
The second part of the challenge asks you to create a list from the string "Hi, I'm Treehouse", you can achieve this by calling the split method on the string which splits the string into a list on spaces.
greeting_list = "Hi, I'm Treehouse".split()
lastly the challenge asks you to replace the Treehouse with your name, you can achive this by changing the correct index of the greeting_list with the correct index of name_list. I dont want to give you the answer rather want you to try it for yourself.
let me know if you need any more help.
Samy Basset
11,862 PointsSamy Basset
11,862 PointsIn your last line of your code you say my_sentence.split() but you have never defined it. So you're splitting something that don't exists. If you change the my_sentence variable to greeting_list for example your code will work(or any existing variable).