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

James McIntyre
James McIntyre
1,329 Points

Task 1 not passing

Origanal task getting blocked, please help.

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

1 Answer

Manish Giri
Manish Giri
15,042 Points

It's easy to rather use the one line option -

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