Reading by positions plain text files

Tim Harig usernet at ilthio.net
Sun Dec 12 14:27:51 EST 2010


On 2010-12-12, Tim Harig <usernet at ilthio.net> wrote:
>> I used .seek() in this manner, but is not working.
>
> It is working the way it is supposed to.
> If you want the absolute position in a column:
>
> 	f = open('somefile.txt', 'r').read().splitlines()
> 	for column in f:
> 		variable = column[3]

or:
	f = open('somefile.txt', 'r')
	for column in f.readlines():
		variable = column[3]



More information about the Python-list mailing list