I am using Python 2.x on Win7.
My question is:
I got a list of numbers: angle = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
and I would like to export the numbers to a csv file. So the csv should look like:
0 | 1 | 2 |...| 10 |
But so far what I got in csv file is:
[0 | 1 | 2 |...| 10] |
My code is:
angle = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
ldsvp = open("C:\Controlled NP\\" + "LDS1.csv", 'ab')
with open('LDS1.csv', 'wb') as output:
ldsvp.write('Angle' + ',' + str(angle))
ldsvp.write('\n')
So...any advice to remove the [
and ]
from the csv file?