List Comprehensions Enhancement

Phil Hunt philh at vision25.demon.co.uk
Tue Sep 14 05:07:25 EDT 1999


In article <slrn7tqhq4.cl9.wtanksle at dolphin.openprojects.net>
           wtanksle at dolphin.openprojects.net "William Tanksley" writes:
> >print [(i,s) for i in nums, for s in strs]
> >or similar.
> 
> I agree -- my initial reaction was to put 'and' as the seperator.  Amazing
> how great minds think alike :).
> 
> print [(i,s) for i in nums and for s in strs]

That's horrible. ``and'' already means something in Python.

-- 
Phil Hunt - - - - - - - - -  philh at vision25.demon.co.uk
 - Linux will be 8 years old on 17th September! See: -
http://www.vision25.demon.co.uk/prog/linuxbirthday.html





More information about the Python-list mailing list