I tried to write output file as a CSV file but getting either an error or not the expected result. I am using Python 3.5.2 and 2.7 also.
Getting error in Python 3.5:
open file without b mode
b mode open your file as binary
you can open file as w
open_file = open("filename.csv", "w")