Python Python Basics (2015) Python Data Types Use .split() and .join()

Lisa Miller
Lisa Miller
680 Points

banana.py

It looks like code that others have posted but I cannot get it to work. What am I missing? Thank you!!

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

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 86,628 Points

You just need to find some way to print it to the console.

Try to pass the correct variable into the print function.

Good luck :)