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
标签云
站点统计

本站现有博文254篇,共被浏览351648

本站已经建立1914天!

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