57
veky
22 48 64 Leader of the month
44584/ 53887
Last seen 20 hours ago
Member for 11 years, 6 months, 6 days
Difficulty Advanced
We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time.

Best reviews / Newest reviews
phi number, golden ratio-kdim 1
https://www.maa.org/external_archive/devlin/devlin_05_07.html More
First-tivvit 1
Nice. Of course, can be expressed with any. any(word.endswith(suffix) for suffix in words_set for word in words_set - {suffix}) Or itertools.permutations, if you're in the mood. :-) More
First-StarkyLife 1 1
Line 4 doesn't serve any purpose, you know? :-) In fact, you can just return the expressions from lines 6 and 8 directly. But it's nice to name at least the return value, when the function name is totally uninformative. ;-) "!= 0" can be removed from line 5. Read it as "if there is a remainder". I More
Second-Sim0000 1 1
Lot can be factored out from this. See my solution. ;-) More
First-tivvit 1
I think set(blah) & set(nyeh) is still nicer than set(blah).intersection(nyeh). But not much. More
First-coells 1
Don't write empty except. It almost never means what you think it means. For example, imagine someone confuses order of arguments, and calls index_power(3, [1,2,3,4]). You'd want TypeError, right? But you get -1. :-( More
root of unity-coells 1 1
Now you're just showing off. But I like it. :-D More
Sum of pigeons-LukeSolo 1
Since you have two lines anyway, how about extracting definition of l to separate line? :-) Also, you shouldn't use mutable defaults unless you _really_ know what you're doing. ps=() is much better. (Usually, = in default definitions doesn't have spaces around it. At least PEP8 says so.:) More
Slow beginner-SFF_libert 1
First, array[len(array)-1] ~~~> array[-1] Second, don't ever write empty except! Say what you really guard against: except IndexError: More
Straightforward-cougarmilk 1
Those indices are not so necessary. :-) row1, row2, row3 = result More
First-Wei5 1 1
I don't get it, why don't you just import hashlib directly?? More
10 lines: complex isn't complex-CDG.Axel 1 1
Since they say that imitation is the sincerest form of flattery, thanks. :-D (4 instead of 5 for that ugly loop management inside, and other repetitions, such as in the last line. Yes, they save lines, but hurt aesthetics.:) More
First & boring-smilicic 1 1
Not boring at all. That [Chekhov's product](https://en.wikipedia.org/wiki/Chekhov's_gun) in first line is very interesting. I deeply wonder what was its intended purpose in the never-revealed third line. :-DD More
kabopan-ciel 1 1
What's wrong with you people? :-) More
lambDeCurrator-veky 1 1
Exercise: find all the places in the code where pairs (tuples of len 2) have been used. ;-) More
Cloud number n in ... e ...-veky 1 1
Thanks @StefanPochmann (do you ever sleep)? More
First of The square chest-grigoriytretyakov 1 1
inside is just `max(divmod(top-1, 4)) < 4 - length`. And set([spam for egggs]) is `{spam for eggs}`. And if you return a set(sides) from square, you can just use subset operator (`square <= lines`) in the last line. More
First-nsmirnoff 1
:-) Even if you _did_ want to convert words to a list (though there is no reason for that here), there is a nicer and explicit way: for y in list(words): More
Naive-Sim0000 1
This is not as naive as it seems. :-) More
hard way-theholy7 1 1
Pytonic way of writing switch is not enormous ifchain, but a dict. Great advantage is that names and codes are next to each other, so you can see what's what. def boolean(x, y, operation): code = dict( conjunction = x and y, disjunction = x or y, impl More