Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (Retired) Shopping List Lists and Strings

Luke Telford
Luke Telford
2,931 Points

Can anyone help with this task for joining strings?

Hello,

I have only just started to learn Python and I am getting the error 'Oops! It looks like task 1 is no longer passing.' with this task. As far as i can tell i have done it correctly but obviously not, help would be greatly appreciated!

greeting_list.py
full_name = "Luke Telford"
name_list = full_name.split()

greeting_list = "Hi, I'm Treehouse".split()

greeting_list[2] = name_list[0]

greeting = greetin_list.join()

1 Answer

Logan R
Logan R
22,989 Points

You are not joining the lists back together correctly.

greeting = ' '.join(greeting_list)

When you join a list back together, you use the ' ' and what every you put in between the ' marks is what it gets joined together with.

For instances:

greeting = "Hello, there! How are you?"
greeting = '555666'.join(greeting_list)

The output would be:

Hope that makes more sense!
Luke Telford
Luke Telford
2,931 Points

Thanks for the reply Logan! i couldn't quite wrap my head around it but i understand now.

Logan R
Logan R
22,989 Points

No problem! Glad I could help :)