CSV File - reader( ) function


☞ Create a reader object to load data from csv file into an iterable after parsing delimited data – csv.reader().

☞ Now fetch data using for loop, row by row .

Example :

def reading():
    f=open("student.csv","r", newline='')
    csv_obj=csv.reader(f)
    for item in csv_obj:
        print(item)
    f.close()    

#start
reading()

Output :

['Name', 'Marks']
['amit', '45']
['ankiy', '63']