Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

csv

>>> import csv
>>> with open('names.csv', newline='') as csvfile:
...     reader = csv.DictReader(csvfile)
...     for row in reader:
...         print(row['first_name'], row['last_name'])
...
Eric Idle
John Cleese

>>> print(row)
{'first_name': 'John', 'last_name': 'Cleese'}
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #csv
ADD COMMENT
Topic
Name
7+2 =