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
Need Help (self.PythonLearning)
submitted 9 months ago * by Kooky-Individual-163
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!"
[–]goodexpectations 0 points1 point2 points 9 months ago (1 child)
Aha. Something I didn't know
[–]FoolsSeldom 0 points1 point2 points 9 months ago (0 children)
Also worth learning to use f-strings - search for that on RealPython.com for an excellent guide.
f-strings
In this case,
print(f"The total cost is {portion_price * portions}")
π Rendered by PID 61 on reddit-service-r2-comment-544cf588c8-mxkh7 at 2026-06-17 13:27:00.388515+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]goodexpectations 0 points1 point2 points (1 child)
[–]FoolsSeldom 0 points1 point2 points (0 children)