i'm trying to write in csv file i have two value in my list [string,int] and this is my code
prod = [['Enveloppes Esquisse adh\xe9sives', 1.85],
['Enveloppes adh\xe9sives Esquisse', 1.1],
['Enveloppes adh\xe9sives Esquisse', 1.1],
['Enveloppes adh\xe9sives Esquisse', 1.85],
['Pochettes kraft Esquisse', 0.95],
['Pochettes kraft Esquisse', 1.75]]
cw = csv.writer(open("nv.csv", 'w'), delimiter=';')
cw.writerow(['Produit', 'Prix'])
for row in prod:
cw.writerow( [row[0],row[1]] )
but i get 'enveloppes' in row then esquisse in other row not all the string in one row can anyone help me ? my csv file should contain two rows, one for 'Enveloppes Esquisse adh\xe9sives' and one for '1,85'
cw.writerow([row[0],row[1]])has the same effect ascw.writerow(row).Text Importdialog,Separated bysection check only thesemicolonoption. All other options should be unchecked.