Reading CSV file in python

Python’s official Documentation says below thing about CSV files,

The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way inĀ RFC 4180.

Reading & Writing CSV files is very easy in Python. Below is a code snippet in python which can be used to read q csv file in python.


import csv

with open('filename.csv', 'r') as csv_file:
    reader = csv.reader(csv_file)
    for row in reader:
        print(row)