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 trialLuke Telford
2,931 PointsCan 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!
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
22,989 PointsYou 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
2,931 PointsLuke Telford
2,931 PointsThanks for the reply Logan! i couldn't quite wrap my head around it but i understand now.
Logan R
22,989 PointsLogan R
22,989 PointsNo problem! Glad I could help :)