I've been trying to get this work but getting the error TypeError: a bytes-like object is required, not 'str'' after upgrading to python 3.
What am I doing wrong here? I tried r, wb+ and w learned from here, Confused by python file mode "w+"
my code:
with open(output_filename, 'wb') as f:   
    # write column names
    f.write("stack,overflow,super,user\n")
    writer = csv.writer(f)
Can anyone help with this? Thanks.
 
    