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

Abheshek cr
Abheshek cr
5,522 Points

task 1 problem

wats the error

banana.py
display_menu = ["banana split, hot fudge, cherry, malted, black and white"]

menu = "Our available flavors are: {}.".format(display_name)

1 Answer

Lots of things going on here: 1.You have overridden the original challenge. The original statement was: available = "banana split;hot fudge;cherry;malted;black and white" (separated by semi-colons) - you have the variable as "display_menu" and commas instead of semi-colons. The results-checker may flag this itself as an error while checking.

  1. The new variable was "sundaes". You have a variable called "menu".
  2. sundaes =available.split(';') will split the values in "available" based on the delimiter ";"