Since e-mail requires a string. Here is what I could do. list.append(item1) list.append(item2)
finalstr = ''.join(list) return finalstr -------------- Original message ---------------------- From: "Gabriel Genellina" <[EMAIL PROTECTED]> > En Tue, 08 May 2007 20:19:22 -0300, Ian Clark <[EMAIL PROTECTED]> escribió: > > > On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> > >> I have a script which has a method which returns multiple strings at > >> once using the yield. I would like to send an e-mail of these values in > >> a single e-mail instead of a mail for each string. How would I be able > >> to do that? > > > > Are you looking for something like the following? If not, try posting > > a small sampling of your code. > > > >>>> def get_data(): > > ... data = ['ham', 'eggs', 'spam'] > > ... for item in data: > > ... yield item > > ... > >>>> all_data = [item for item in get_data()] > >>>> all_data > > ['ham', 'eggs', 'spam'] > > Or simply: all_data = list(get_data()) > > -- > Gabriel Genellina > > -- > http://mail.python.org/mailman/listinfo/python-list
-- http://mail.python.org/mailman/listinfo/python-list