Q. Write a Python program to read a given CSV file having tab delimiter.
Answer =
import csv file = open( "Pathwalla.csv","r" ) data = csv.reader(file, delimiter = "\t") for i in data : print(i) file.close()
Answer =
import csv file = open( "Pathwalla.csv","r" ) data = csv.reader(file, delimiter = "\t") for i in data : print(i) file.close()
can we write "\t" instead
ReplyDeleteYes. you are write.
DeleteThe filetype is a text type, it should be .csv, isnt it?
ReplyDeleteSorry, I have corrected it.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )