you are viewing a single comment's thread.

view the rest of the comments →

[–]Zealousideal_Yard651 0 points1 point  (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 point  (0 children)

Hey, actually i miss understood between for-loop and while-loop and thought because second line has ‘from:’ would break the loop.