[Tutor] when string,join won't work

Moshe Zadka moshez@zadka.site.co.il
Thu, 4 Jan 2001 04:18:45 +0200 (IST)


On Wed, 03 Jan 2001 09:04:07 -0800 (PST), "Sean 'Shaleh' Perry" <shaleh@valinux.com> wrote:
> string.join assumes that the sequence is all strings.  What do i do if this is
> not the case.  A friend is trying to make db requests and print the returned
> data.  Not every field is a string, so join won't work.  Suggestions?

Make them strings:

string.join(map(str, sequence))

Read about ``map'' and ``str'' at your friendly neighbourhood library
reference guide. (http://www.python.org/doc/)
-- 
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!