[Tutor] list problem

John Fouhy john at fouhy.net
Wed Feb 21 09:21:26 CET 2007


> Kirk Bailey wrote:
> > ok, here comes some code:
> >
> > f1=open(pagename,'r')
> > page=f1.readlines()
> > f1.close()
> >
> > at the end of which, the data is in page, which is a list. But
> > something strange is going on here. all the data is in a single cell!
> > it's a one cell list! Say what?

Have you tried looking at pagename in a text editor?  If readlines()
is returning only one line, then you should be able to spot that in
the file.

-- 
John.


More information about the Tutor mailing list