The instructions are:
Since there is no longer an "anchovies" pizza, you want to add a new topping called "peppers" to keep your customers excited about new toppings. Here is what your new topping looks like:
[2.5, “peppers”]
Add the new peppers pizza topping to our list pizza_and_prices . Note: Make sure to position it relative to the rest of the sorted data in pizza_and_prices , otherwise our data will not be correctly sorted anymore!
Here’s what I did:
39. pizza_and_prices.insert(int(2.5), “peppers”)
When I print it shows:
[(1, ‘cheese’), (2, ‘mushrooms’), ‘peppers’, (2, ‘olives’), (2, ‘pepperoni’), (3, ‘sausage’), (6, ‘pineapple’)]
The 2.5 is missing. no error reported. How can I get the 2.5 to print?
The second argument to the insert method is what you insert into your list. You pass "2.5, peppers" which is a string. How would you create a list with those two elements? Once you’ve got that bit pass it instead of the string.
They are indeed different characters with the trick being that the forum automatically alters the standard " to a “ which is troublesome for code as it also affects other characters such as * and ` for example. If you’re ever submitting code to the forums please use the formatting options which avoids this whole issue- How do I format code in my posts? though I’d suggest keeping the copy/paste to a minimum anyway and instead grasping the idea from any helpful guidance but implementing it yourself .