Question about concatenation error

Terry Hancock hancock at
Wed Sep 7 20:22:00 CEST 2005

On Wednesday 07 September 2005 11:34 am, colonel wrote:
> I am new to python and I am confused as to why when I try to
> concatenate 3 strings, it isn't working properly. 
> Here is the code:

I'm not taking the time to really study it, but at first
glance, the code looks like it's probably much more
complicated than it needs to be.

> ["['index.html']",
> "['movies.html']",
> "['ramblings.html']",
> "['sluggies.html']",
> "['movies.html']"]

The tail end of that is the string representation of
a list containing one string, not of that string. I
suspect you needed to use ''.join() somewhere.  Or,
you could, in principle have indexed the list, since
you only want one member of it, e.g.:

>>> ['index.html'][0]

Terry Hancock ( hancock at )
Anansi Spaceworks

More information about the Python-list mailing list