Beema shafreen wrote: > 2721520 2721569 A_16_P21360235 199 -49 > 2721768 2721821 A_16_P03641971 139 -53 > 2721960 2722004 A_16_P21360237 312 -44 > I need to append the column D and E into a list: > in such a way that the list should have > [D,E,D,E,D,E........] > How do i do it. > > regards > shafreen
Without a header, you could use something like data = [x.split()[-2:] for x in open(filename).readlines()] With header f = open(filename) f.readline() data = [x.split()[-2:] for x in f.readlines()] -- http://mail.python.org/mailman/listinfo/python-list