[FRPythoneers] iterator like inject:into to generating comma-separated list

Ben Harding blh at hydrosphere.com
Tue Sep 17 10:02:50 MDT 2002


On 17 Sep 2002 at 10:51, Cameron Laird wrote:
> > 		.
> I'm actually fond of map and lambda.  For those following
> along at home, let's make clear what a list comprehension
> offers:
>   string.join([str(item) for item in list], '; ')
> or
>   ', '.join([str(element) for element in list])

I _am_ following along at home.  I had no idea that I already knew 
what a list comprehension was, so this was helpful.  But, I wonder 
why the distinction between "item" and "element" in these two 
statements.

Ben Harding
--
--------------------------------------------------
-- Ben Harding              blh at hydrosphere.com --
--       Hydrosphere Resource Consultants       --
--       Hydrosphere Data Products              --
--       1002 Walnut, Suite 200                 --
--       Boulder CO 80302                       --
--       http://hydrosphere.com/                --
-- 303-443-7839 voice          303-442-0616 fax --
--                                              --
-- Publishing Natural Resources Data on CD ROM  --
--  Consultants in Natural Resources Planning   --
--------------------------------------------------




More information about the FRPythoneers mailing list