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

michelle Jia
michelle Jia
4,617 Points

error pops up 'Did you use ",". join()?' when submitted the code to system

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

codes above can run thru in workspace, but cannot pass the system validation, always say i didn't use join method which i really did use.

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

1 Answer

Ines Fazlić
Ines Fazlić
Python Web Development Techdegree Student 9,569 Points

Hi Michelle, the challenge asks you on the third task to make a new variable called display_menu and its value is sundaes joined together with a coma and a space, and then you put that variable inside the .format(). So you missed a step.

michelle Jia
michelle Jia
4,617 Points

Thanks. i didn't notice the space after comma. my bad.