I have some data generated in a list. I have created a csv file and it appends data in csv file.But I need to store the data as integer/string not as a list. My code is below:
VALUE = list(map(int, VALUE))
print(name, VALUE)
with open("data.csv", "a") as out_file:
out_string = ""
out_string += "" + name
out_string += "," + str(VALUE)
out_string += "\n"
out_file.write(out_string)
I need to remove the [
and ]
generated in column 2 and 17. I am not sure how to do it.
"," + str(VALUE)
by", ".join(VALUE)
– olinox14 Oct 3 '19 at 8:46