EADST

Convert CSV or TSV File to Python List

Convert CSV or TSV File to Python List

import csv

with open("file_name.tsv") as file:
    tsv_file = list(csv.reader(file, delimiter="\t"))
    for line in tsv_file:
        print(line)

Reference

Simple Ways to Read TSV Files in Python

相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文266篇,共被浏览440586

本站已经建立2019天!

热门文章
文章归档
回到顶部