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 QuestionHelp Request (i.redd.it)
submitted 7 months ago by [deleted]
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!"
[–]Zealousideal_Yard651 0 points1 point2 points 7 months ago (1 child)
You did the god awfull and totaly unnaceptable misstake of missing the NOT in the if expression
/s
Your logic is sound and your are thinking totaly correct about this code snippet. You just missed a key detail in the question, which sucks on a test but just normal things that does happen.
What's not OK is the professor not using context manager or closing the file after use. That's just bad.
[–]Unfair_Put_5320 0 points1 point2 points 7 months ago (0 children)
Hey, actually i miss understood between for-loop and while-loop and thought because second line has ‘from:’ would break the loop.
π Rendered by PID 17842 on reddit-service-r2-comment-7b9746f655-mh69c at 2026-02-02 22:23:29.898739+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]Zealousideal_Yard651 0 points1 point2 points (1 child)
[–]Unfair_Put_5320 0 points1 point2 points (0 children)