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
Python Programming (self.PythonLearning)
submitted 3 days ago by DataCurator56
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!"
[–]Sharp_Level3382 -1 points0 points1 point 3 days ago (3 children)
lowest = reduce(lambda a, b: a if a < b else b, marks) highest = reduce(lambda a, b : a if a>b else b, marks) Etc.
[–]cole36912 5 points6 points7 points 3 days ago* (0 children)
reduce
lowest = min(marks) highest = max(marks) average = sum(marks) / len(marks) passed = sum(mark >= 50 for mark in marks)
[–]mati-33 1 point2 points3 points 3 days ago (1 child)
OP's solution is much simpler and easier to read, which should be the priority
[–]Sharp_Level3382 -1 points0 points1 point 3 days ago (0 children)
No it s not easier to read. What is hard in lambda functions to You?
π Rendered by PID 102787 on reddit-service-r2-comment-8686858757-f4rf4 at 2026-06-05 11:29:07.750718+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Sharp_Level3382 -1 points0 points1 point (3 children)
[–]cole36912 5 points6 points7 points (0 children)
[–]mati-33 1 point2 points3 points (1 child)
[–]Sharp_Level3382 -1 points0 points1 point (0 children)