文件内容xixi.txtaaa 123 cccbbb 456 ddd读取文件的第三列
with open('xixi.txt','r', encoding='utf-8') as f: for item in f: data=(item.split()) len(data) print( '%s' %(data[2]))
返回:cccddd