摘要: 如文件(t.txt)中有数据:1.2332 2.3232 3.433434 5.43432.3232 5.4343 9.3232912.21 111 123.123 1 f = open('t.txt') 2 3 rs = [] 4 5 [rs.extend(x.strip().split()) for x in f] 6 rs = [x for x in rs if float(x) > 5] 7 print rs 8 9 10 11 12 """13 for x in f:14 rs.extend(x.strip().split())15 阅读全文
posted @ 2013-05-21 01:00 Roger| 阅读(264) 评论(0) 推荐(0) 编辑