Strange list problem

Gustaf Liljegren gustafl at algonet.se
Wed Aug 21 17:31:17 EDT 2002


Gustaf Liljegren <gustafl at algonet.se> wrote: 

> Sorry for that bad subject; it's hard to describe this problem. I get
> list items instead of strings from the following operation:
> 
>   # Extract links for web pages
>   def getLinksHTML(self):
>     if self.refs:
>       ...
>       for a in self.refs:
>         print a
> 

I found it. The whole list looked like [['a']['b']...] so that's why I got 
['a'] and ['b'] instead of 'a' and 'b'. Many problems can be solved just by 
going to the toilet. :-)

Gustaf



More information about the Python-list mailing list