Re: mapping function to vars

2004-12-09 Thread jahurt
Steven Bethard wrote: > [EMAIL PROTECTED] wrote: > > I need to map a function to several variables. I'm trying to use map > > and lambda to do this. Here's my attempt... > > > > #!/usr/bin/env python > > from random import * > > > > [fee, fye, foe, fum] = map(lambda n: random(), range(4)) > > >

mapping function to vars

2004-12-09 Thread jahurt
I need to map a function to several variables. I'm trying to use map and lambda to do this. Here's my attempt... #!/usr/bin/env python from random import * [fee, fye, foe, fum] = map(lambda n: random(), range(4)) print fee print fye print foe print fum ...I'm essentially trying to map a funct