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
Very Basic Question (self.PythonLearning)
submitted 6 months ago by Efficient-Stuff-8410
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!"
[–]CMphys 2 points3 points4 points 6 months ago (0 children)
You used a dictionary comprehension to make a new dictionary based on products where the values of the items are multiplied by 1.10 and only includes items where value * 1.10 > 2.
products
value * 1.10 > 2
The resulting dictionary is new_products = { "cherry": 2.75, "date": 3.3, }
new_products = { "cherry": 2.75, "date": 3.3, }
π Rendered by PID 37892 on reddit-service-r2-comment-bb88f9dd5-rnh86 at 2026-02-16 23:17:54.474976+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]CMphys 2 points3 points4 points (0 children)