On Tue, Aug 2, 2011 at 11:12 AM, Anand Balachandran Pillai
wrote:
> On Mon, Aug 1, 2011 at 7:51 PM, Dhananjay Nene
> wrote:
>
>> On Mon, Aug 1, 2011 at 7:26 PM, Anand Balachandran Pillai
>> wrote:
>> > IMHO, map/filter/reduce and the inevitable companion lambda were
>> > added on to Python whe
Anand Balachandran Pillai writes:
[...]
> 1. List comp
>
> >>> sum([x*x for x in range(10)])
> 285
>
> 2. Map
>
> >>> sum(map(lambda x: x*x, range(10)))
> 285
>
> 3. Reduce
>
> >>> reduce(lambda x,y: x + y*y, range(10))
> 285
A quote from Guido
"filter(P, S) is almost always written c
On Mon, Aug 1, 2011 at 7:51 PM, Dhananjay Nene wrote:
> On Mon, Aug 1, 2011 at 7:26 PM, Anand Balachandran Pillai
> wrote:
> > IMHO, map/filter/reduce and the inevitable companion lambda were
> > added on to Python when it was still trying to find its identity on
> where
> > it stood in the pa
On Mon, Aug 1, 2011 at 7:26 PM, Anand Balachandran Pillai
wrote:
> IMHO, map/filter/reduce and the inevitable companion lambda were
> added on to Python when it was still trying to find its identity on where
> it stood in the pantheon of dynamic typed languages - since it wanted
> to be everyt
On Mon, Aug 1, 2011 at 5:44 PM, Dhananjay Nene wrote:
> On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu wrote:
>> 2011/8/1 Dhananjay Nene :
>>> On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu
>>> wrote:
2011/8/1 Dhananjay Nene :
> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar
>
On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu wrote:
> 2011/8/1 Dhananjay Nene :
> > On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu
> wrote:
> >> 2011/8/1 Dhananjay Nene :
> >>> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar <
> asif.jama...@rezayat.net> wrote:
> What if I have two lists
On Mon, Aug 1, 2011 at 4:41 PM, Baishampayan Ghose wrote:
> On Mon, Aug 1, 2011 at 4:38 PM, Dhananjay Nene
> wrote:
>> I also find map much more atomic and portable construct to think in -
>> after all every list comprehension is syntactic sugar around map +
>> filter, and map/reduce/filter are
On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu wrote:
> 2011/8/1 Dhananjay Nene :
>> On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu
>> wrote:
>>> 2011/8/1 Dhananjay Nene :
On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar
wrote:
> What if I have two lists for both minimum and max
On Mon, Aug 1, 2011 at 5:09 PM, Anand Chitipothu wrote:
>>> I also find map much more atomic and portable construct to think in -
>>> after all every list comprehension is syntactic sugar around map +
>>> filter, and map/reduce/filter are far more omnipresent than list
>>> comprehensions.
>>
>> Th
2011/8/1 Baishampayan Ghose :
> On Mon, Aug 1, 2011 at 4:38 PM, Dhananjay Nene
> wrote:
>> I also find map much more atomic and portable construct to think in -
>> after all every list comprehension is syntactic sugar around map +
>> filter, and map/reduce/filter are far more omnipresent than lis
2011/8/1 Dhananjay Nene :
> On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu wrote:
>> 2011/8/1 Dhananjay Nene :
>>> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar
>>> wrote:
What if I have two lists for both minimum and maximum values
Minimum Maximum
0 10
On Mon, Aug 1, 2011 at 4:38 PM, Dhananjay Nene wrote:
> I also find map much more atomic and portable construct to think in -
> after all every list comprehension is syntactic sugar around map +
> filter, and map/reduce/filter are far more omnipresent than list
> comprehensions.
The above will es
On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu wrote:
> 2011/8/1 Dhananjay Nene :
>> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar
>> wrote:
>>> What if I have two lists for both minimum and maximum values
>>>
>>> Minimum Maximum
>>> 0 10
>>> 11 20
>>> 21
2011/8/1 Dhananjay Nene :
> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar
> wrote:
>> What if I have two lists for both minimum and maximum values
>>
>> Minimum Maximum
>> 0 10
>> 11 20
>> 21 30
>> 31 40
>>
>>
>> Now how should I check if actu
On Mon, Aug 1, 2011 at 12:08 PM, Anand Balachandran Pillai
wrote:
> On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar wrote:
>
>> What if I have two lists for both minimum and maximum values
>>
>> Minimum Maximum
>> 0 10
>> 11 20
>> 21 30
>> 31 40
On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar wrote:
> What if I have two lists for both minimum and maximum values
>
> Minimum Maximum
> 0 10
> 11 20
> 21 30
> 31 40
>
>
> Now how should I check if actual result is not laying between above ran
On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar wrote:
> What if I have two lists for both minimum and maximum values
>
> Minimum Maximum
> 0 10
> 11 20
> 21 30
> 31 40
>
>
> Now how should I check if actual result is not laying between above ran
Asif Jamadar writes:
> What if I have two lists for both minimum and maximum values
>
> Minimum Maximum
> 0 10
> 1120
> 2130
> 3140
>
>
> Now how should I check if actual result is not laying between above ranges
>
> if not minimum<=act
What if I have two lists for both minimum and maximum values
Minimum Maximum
0 10
11 20
21 30
31 40
Now how should I check if actual result is not laying between above ranges
if not minimum<=actual_result and not maximum>=actual
On Sat, Jul 30, 2011 at 1:13 PM, Asif Jamadar wrote:
> if not minimum<=actual_result and not maximum>=actual_result:
>
> How to check if actual result is not laying between minimum value and maximum
> value.
if not minimum <= actual_result <= maximum:
___
Asif Jamadar writes:
> if not minimum<=actual_result and not maximum>=actual_result:
>
>
> How to check if actual result is not laying between minimum value and maximum
> value.
>
> how should I represent the above statement in python?
>
> Any suggestions?
[...]
The following will check for r
if not minimum<=actual_result and not maximum>=actual_result:
How to check if actual result is not laying between minimum value and maximum
value.
how should I represent the above statement in python?
Any suggestions?
___
BangPypers mailing list
Ban
22 matches
Mail list logo