newline
does not work in with open('output.csv', 'a',newline='') as fp
. It will return back an error:
'newline' is an invalid keyword argument for this function
I used 'ab'
method and it worked without blank lines between the lines:
with open('output.csv', 'ab',) as fp