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 (2015) Python Data Types Use .split() and .join()

join and split task 3 of 3 keeps going back to "oops! it looks like Task 2 is no longer passing "

tested this in the workspace without error but each time when verifying the code, the error message 'Task 2 no longer passing' comes up

  1. available = "banana split;hot fudge;cherry;malted;black and white"
  2. sundaes=available.split(';')
  3. menu="our available flavors are:{},"
  4. display_menu="(',').join(sundaes)"
  5. menu=display_menu.format(sundaes)
banana.py
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu="our available flavors are:{},"
display_menu="(',').join(sundaes)"
menu=display_menu.format(sundaes)

think i figured task 2 error but now getting that task 1 is not passing

available = "banana split;hot fudge;cherry;malted;black and white" sundaes=available.split(';') menu="our available flavors are:{}," display_menu=",".join(sundaes)" menu=display_menu.format(sundaes

3 Answers

available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu="our available flavors are:{},"
display_menu="(',').join(sundaes)"
# When you reassign menu below, you're getting rid of the string "our available flavors are:{}"
menu=display_menu.format(sundaes)

Try this

available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu = 'Our available flavors are:{}'
display_menu = menu.format((',').join(sundaes))

Thanks Bryan Reed. I am not sure if there is bug or something but I now i am getting this error Bummer! Did you use ", ".join()?

I tired the code in another IDE and it worked so i am positive your suggestions is good but its not being accepted for some reason.

Results from Repl.it display_menu

=> 'Our available flavors are:banana split,hot fudge,cherry,malted,black and white'

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Ian;

When you are joining there needs to be a space after the comma. ',<space here>'

Post back if you are still stuck.

Ken