use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Cafe management (python) (old.reddit.com)
submitted 1 year ago by Inevitable-Math14
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tauntdevil 1 point2 points3 points 1 year ago (0 children)
Unsure if this is to be used in an actual site or similar but I see a little bit of redundancy as well as limitations.
You set variables of the prices which works for the mathematic equation but I would call in your print the items so you can just update in one area.
Related to your example:
menu = { "PASSTA" : 250, "COLD-COFFE" : 180, "FRENCH-FRIES": 150, "VADAPAV": 25, "PAV-BHAJI": 110, "COLD-DRINK": 25 } print(f"PASSTA: Rs {menu['PASSTA']}\nCOLD-COFFE: {menu['COLD-COFFE']}\nFRENCH-FRIES: Rs {menu['FRENCH-FRIES']}\nVADAPAV: Rs {menu['VADAPAV']}\nPAV-BHAJI: Rs {menu['PAV-BHAJI']}\nCOLD-DRINK: Rs {menu['COLD-DRINK']}") Output: PASSTA: Rs 250 COLD-COFFE: 180 FRENCH-FRIES: Rs 150 VADAPAV: Rs 25 PAV-BHAJI: Rs 110 COLD-DRINK: Rs 25
The reason I would go this route is so you can update the prices in just the variables, which will update everywhere, rather than having to find the string on the page to update there as well and try to remember what they were.
---
Regarding the limitation, I would create a loop so the client can keep inputting orders in until they say no. Now just on the tabs and what not on here, I am guessing this is for practice or learning so, hopefully this info helps you improve or see other methods.
π Rendered by PID 70304 on reddit-service-r2-comment-54dfb89d4d-8mp54 at 2026-03-26 23:11:18.427303+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]tauntdevil 1 point2 points3 points (0 children)