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

Problem with number 4.

on challenge 4, i wrote this in, apparently it doesn't work. any suggestions?

full_name = "Eirik clay mulder"
name_list = full_name.split()
greeting_list = "Hi, I'm Eirik".split()
greeting = greeting_list.join(" ")

8 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Hi, I went through the challenge.

full_name = "Eirik clay mulder"
name_list = full_name.split()
greeting_list = "Hi, I'm Treehouse".split()
greeting_list[2] = name_list[0]
greeting = " ".join(greeting_list)

sorry about my indentation, i just got an account a couple days ago.

William Li
William Li
Courses Plus Student 26,868 Points

hi, eirikmulder , welcome to Treehouse, I fixed the code block for you.

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

You got it almost correct. Except that list class in Python doesn't have the join() method, string class does. So change your last line to

greeting = " ".join(greeting_list)

it should work fine now.

Thanks!

It still isn't working, any more suggestions?

problem number 4

thanks!

it works now.