Instruction
Good job! In the previous exercise, you could see that values were aligned to the left, which is the default behavior. We can change alignments using < (explicitly align to the left), ^ (align to the center), and > (align to the right). Take a look:
user_name = 'Kate'
greeting = 'Hello {:^10s}!'.format(user_name)
print(greeting)
Result:
Hello Kate !
Exercise
Given a dictionary of menu items, create a visually appealing menu:
--MENU--
Each starter 25.00
Each main course 60.00
Each dessert 35.00
Soft drink: 15.00
- The
--MENU--string should take up 30 characters and be centered. - Menu items should take up 25 characters.
- Prices should take up 5 characters, including 2 digits after the decimal point.
Stuck? Here's a hint!
Use the following for loop:
for key, value in menu.items():



