I am trying to read and write on the same CSV file:
file1 = open(file.csv, \'rb\') file2 = open(file.csv, \'wb\') read
It is not possible to open the same file in two different modes in python.You have to release one of the file pointers with file_name.close() before opening the file in another mode!