Posted in Python onMarch 11, 2014
import csv for line in open("test.csv"): name,age,birthday = line.split(",") name = name.strip(' \t\r\n'); age = age.strip(' \t\r\n'); birthday = birthday.strip(' \t\r\n'); print (name + '\t' + age + '\t' + birthday)
csv文件
alice, 22, 1992/03/05 bob, 33, 1981/11/21 cart, 40, 1974/07/13
python读取csv文件示例(python操作csv)
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@