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

Lalit Aditya
Lalit Aditya
400 Points

Use .split() to break the available string apart on the semi-colons (;). Assign this to a new variable sundaes.

Why is "sundaes=available.split(;)" wrong?

banana.py
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(;)

2 Answers

Chase Carnaroli
Chase Carnaroli
5,139 Points

Try this: sundaes=available.split(";")

You just have to put quotes around the ;

Lalit Aditya
Lalit Aditya
400 Points

Thanks Chase!!! It worked I think I got screwed up.