眼底血管图片数据的采样函数(每隔20行进行采样操作)

with open('DATA.txt') as reader, open('newfile.txt', 'w') as writer:
    for index, line in enumerate(reader):
        if index % 20 == 0:
            writer.write(line)        

 

posted @ 2018-02-19 14:50  fourmii  阅读(189)  评论(0编辑  收藏  举报