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

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 :)