Skip to content

Instantly share code, notes, and snippets.

@mateisuica
Created September 11, 2017 17:57
Show Gist options
  • Save mateisuica/5645ec4e437487f2ffbe7676c269727d to your computer and use it in GitHub Desktop.
Save mateisuica/5645ec4e437487f2ffbe7676c269727d to your computer and use it in GitHub Desktop.
Open a CSV file in Python
import csv
sites = []
with open('data.csv', 'rt') as csvfile:
spamreader = csv.reader(csvfile)
for row in spamreader:
sites.append(row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment