Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

How to read a tab seperated file in python

As we place the delimiter to comma in the comma seperated file. But if the file is tab seperated the what should be written in the delimiter. import csv

with open('DS1-online.txt') as data:
    reader = csv.reader(data, delimiter = ',')
    for row in reader:
        print(row)
Zhuoer Dong
10 Points

(1) Replies

Please login or register to Comment or Answer