Need help on reading line from file into list

bahoo b83503104 at yahoo.com
Tue Apr 3 15:55:06 EDT 2007


Hi,

I have a text file containing a single line of text, such as
0024

How should I read it into a "list"?

I tried this, but the "join" did not work as expected. Any
suggestions?

infile = open('my_file.txt','r')
for line in infile:
	line.join(line)
	my_list.extend( line )




More information about the Python-list mailing list