I can tell my code is wrong for a number of reasons, but here is what I currently have. RetailItem is an object that is just the three values, description, stock, and price.
This is my current attempt at modulo formatting.
print("%d. %s $%20.2f" % (count, i.description, i.price))
I am reading through this page on the modulo string formatting, but it is just telling me how to set the minimum width instead of the maximum. What I currently have is just setting the minimum width, which messes it up because the other parts of the string are at different lengths. https://realpython.com/python-modulo-string-formatting
Thank you for your help!
A project I am working on is supposed to look like this:
Menu
---------------------------------
1. Pants $19.99
2. Shirt $12.50
3. Dress $79.00
4. Socks $1.00
5. Sweater $49.99
6. Cancel Purchased Item
But instead, it looks like this:
Menu
---------------------------------
1. Pants $ 19.99
2. Shirt $ 12.50
3. Dress $ 79.00
4. Socks $ 1.00
5. Sweater $ 49.99
6. Cancel Purchased Item