How to fix: ValueError : I/O operation on closed file
how to fix I/O operation on closed file error?
ValueError : I/O operation on closed file
This error get because of improper indentation. check your code indentation.
If your using with statement, you need to write operation inside the with statement if not you get error.
with open("employee.csv", "r") as employees: read_csv = csv.reader(employees) for row in read_csv: print("Rows: ", row)