13
grutte_pier
11 24
743/ 845
Jakob van Bethlehem
Last seen 5 years ago
Member for 10 years, 3 months, 20 days
Difficulty Normal
Best reviews / Newest reviews
First-DanielDou 3 1
Why not type the possible winning combinations as integers directly? combos = [[0, 1, 2], [3, 4, 5], [6, 7, 8], ...] More
arithmetic-bunnychai 2
I don't agree at all with people saying the solution is not 'readable': learn your maths! More
Using sympy module. Not optimal at all.-quarkov 2
Since you have the math skills to derive the equation, I really don't understand why you didn't just went ahead and solved the equation. Very nice introduction to the sympy module though, which I didn't know about yet. More
First-AmaroVita 1
Instead of defaulting to _None_ for the _key_, you could also default to _lambda x: x_. Then the big _if_ statement on line 24 could be simplified a lot, because you can always apply _key_ More
First-plamer 1 1
Hm, better use _enumerate(array)_ More
Thanks to PL-bryukh 1 1
Nice and short, but this executes a full count for every single character in the string (i.e. a string with 100 characters will be looped over 100 times) even if the count for that character was already done before. Just imagine what would happen if you asked your text editor to do the count of your More
First-BlindSphinx 1 1
Nice solution - would have been a perfect clear solution, if you had just written _count += grid[n_row][n_col]_ instead of the superfluous _if_ More
House password-Dronimo 1 1
There is no need for the big _if-else_ test at the end! Just say: return len(data)>9 and lower_amount and digit_amount and upper_amount That already is the bool you're looking for! More
Stack-veky 1 1
Good idea to store the closing brackets - makes for exactly the simplification I knew existed, but didn't think of. More
Regex of getting the suffix-schanjr 1
Regexes tend to be slower than direct comparisons, and your comparing every word with every other word - 'speedy' is really the wrong category I'd say More
Nifty pattern class-AntoniGoldstein 1
Instead of using _re.sub_ to substitute and then to split, you could also immediately split using _re.split_ More
Second-AdamToth 1
You're comparing every word with every other word - that's not speedy! More
All you need-veky 1
As usual you managed to come up with an extraordinary solution More
First-SakisBrouzioutis
There is absolutely no need to first copy over the full array. More
First-Screw
Very creative how you have used some algebraic properties of numbers to determine whether the number is divisible. More
First-A.Garcia
There are quite a few 'non-Pythonic' elements to this: * _if array==[]_ is exactly equivalent to just using _if array_ * in Python you really shouldn't write a loop over an index, which is then used to access a list (unless you really, really can not do otherwise). Instead you should over the list d More
First-Eto
Just in case you didn't check other solutions yet: the builtin _count_ method does exactly what you explicitly typed in the loop More
First-zhangjian
Interesting method to get out the words! More
Second-luvs
Much better than your first :D More
Solution to Problem 1-erick.kusnadi.75
I came up with the same idea, so I like it (+1), except that you destroy the input list. I don't think the users of your code expect that to happen (-1) ;) More
1
2 3 4 5