• ###### adbilenlacommented on "Sort by Example" python solution

python is black magic

#11b80/3v6:0z:vV:::

• ###### rm76commented on "Array element parity" python solution

Clever, lightning-fast, best-practice!

• ###### elyasafecommented on "Array Exchange" python solution

This is genius

• ###### Ulincommented on "L1: Set Alarm" python solution

I overthink things sometimes

• ###### Blind4Basicscommented on ""Upper Cut"" python solution

:o

N calls to upper ;)

• ###### Darshan97commented on "Max number of people and year in a specific place" kata

Why does the example on the description have the same inputs but different outputs? Am I missing somethere here?

``````year_max_people([(1980, 2010), (1979, 1985), (1986, 1995), (1987, 2008)]) == (3, 1987)
year_max_people([(1980, 2010), (1979, 1985), (1986, 1995), (1987, 2008)]) == (3, 1986)
``````
• ###### zygfryd32commented on "Triple trouble" python solution

counter is useless, a simple input of (1011, 11) breaks your solution

• ###### BQJcommented on "Array plus array" python solution

I jsut wanted to sumsumsum

• ###### BenjaminPrykecommented on "Array plus array" python solution

It doesn't modify the arrays, but creates a new array.

• ###### Rishat Nurievcommented on "Sum of Minimums!" python solution

@Unnamed, @Blind4Basics: There is a Guido's article about List Comprehensions and Generator Expressions advantages - http://python-history.blogspot.com/2010/06/from-list-comprehensions-to-generator.html
But yeah, it's more about comparison between LCs and (map with lambda). Thanks for correcting me

• ###### Blind4Basicscommented on "Sum of Minimums!" python solution

@Rishat Nuriev:

see the fork: no meaningful difference between the three versions (500 tests on one input of size 500x500). The 3 versions perform about the same. Sometimes one is faster than the others, but not always the same one. You'd need something far more precise to actually see any consistent difference.

@Unnamed: you don't use lambda in there, so no overhead on this side (which is often what is slowing this kind of approach, I believe).

• ###### Unnamedcommented on "Sum of Minimums!" python solution

2 Usually true.
1 Who told you that? I know Python folks don't like lambdas, but I haven't heard anything about `map`. One function call is easier to read than an expression where a new variable is introduced for no reason.

• ###### Rishat Nurievcommented on "Sum of Minimums!" python solution
1. It's better to use List Comprehensions instead of (map/filter) when possible
2. It's better to use Generator Expressions instead of List Comprehensions when possible
• ###### apneckcommented on "Bug Fix - Quick Sort" python solution

The obvious solution. lol