Where did I go wrong?

  1. Hard to tell with the lack of indentation here, but I suspect it is the indentation itself. Are both lines 18 and 19 indented inside of your with context manager? If line 19 is not indented, then when the context manager finishes reading the contents of quesfile, it will close both files.

  2. Yeah, sorry for that, I fixed indentation but now instead of printing out the questions written in the question files it prints out “easy.txt”?

Leave a Reply

Your email address will not be published. Required fields are marked *

Author: admin