Newbie question: how to join a list of elements of user-defined types?

Cliff Wells logiplexsoftware at earthlink.net
Mon Apr 29 22:02:05 EDT 2002


On 29 Apr 2002 18:54:12 -0700
Fortepianissimo wrote:

> This question is so fundamental that I strongly suspect it's already
> answered - ig that's the case, please forgive this poor newbie, for he
> has done some work searching over Python FAQ and Google.
> 
> Basically I want to have a subclass of list, like
> 
> class MyList (list):
>     ...
> 
> then I want to
> 
> l=MyList()
> ... do stuff to fill l
> s=" ".join(l)

s = " ".join([str(i) for i in l])


-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308





More information about the Python-list mailing list