Question: Create a dictionary to store information for a sandwich being made. The customer has ordered a a footlong, with wheat bread, and toppings: ( mayo

Create a dictionary to store information for a sandwich being made. The customer has ordered a a footlong, with wheat bread, and toppings:
(mayo, mustard, onion, vinegar, lettuce, tomato, salt, pepper and extra cheese (pepper jack and american)).
a. Hint Youll want to store your toppings in a list inside your dictionary! This means that you will have a key-value pair toppings and the value will be a list of toppings.
b. Do not print the raw list in your output. You need to learn to flatten nested data structures, so think about how you might flatten that list when you are iterating over your dictionary.
After you create the dictionary, summarize the order with a simple f string that states:
Order 001: Size{}, Bread{} Toppings:{} being sure to unpack the list of toppings and pass them to the f-string. Make sure you also pass the size and type of bread to the f-string as well.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!