当前位置:首页>开发>正文

python获取文件的某列

2023-07-03 23:42:28 互联网 未知 开发

 python获取文件的某列

python获取文件的某列

def iteriteminfile(filename, column, spliter=,):
    with open(filename, rt) as handle:
        for ln in handle:
            yield ln.split(spliter)[column]

最新文章