57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 13 hours ago
Member for 11 years, 6 months, 24 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
Compare Functions-przemyslaw.daniel 2 1
Everything works well untill that monstrous return. Yes, Python doesn't have switch statement, and indexing with a bool is fine, but indexing with 2-bit integer constructed from two bools is probably pushing it. int is not the only thing collections can be indexed with... how about a dict? {(T More
Documented code, with list comprehensions-marat.m 2 1
Specialcasing what shouldn't be specialcased, sorting to find the minimum, list "comprehensions" which do nothing at all... :-/ A perfect example of how you can't fix the bad code by documenting it. :-] * What's wrong with treating 0 the same as all the other numbers? * Imagine you have a thousan More
First-RomanKorbutyak 2 1
Cool. But _why_ `*` instead of `and`?? If you're concerned about repetition, you can use `all`. ;-) And those lines 5~7 can be written in point-free manner, if you're interested: has_digit = any(map(str.isdigit, data)) More
First-tdietert 2 1
Putting obvious solution aside, here is your algorithm written in Python, not in some Lisp-Java mix you've written. ;-) def checkio(str_number, radix): import string result, value = 0, (string.digits + string.ascii_uppercase).index for exponent, digit in enumerate(r More
First-Sim0000 2 1
That brutely memoized factorial is really cute. :-D More
Yield!-LukeSolo 2 1
LOL. I'm beginning to like you. You have some potential. ;-) (Of course, you're aware of bin builtin? Just checking...) More
First-ilih 2
I don't see what's so funny in binary addition. More
First (ugly?)-g.david.krupicka 2 1
Nice handling of empty stack. :-) But the end is just return not stack More
First-freixodachamorra 2 1
Why not simply "return l == list"? Lists are equal, not only their lengths. More
Newbie trying to learn Python style-johngraham 2
You're obsessed with lists. :-9 enumerate, .index, and a lot of other things work on many more data structures than lists. And .index can receive additional parameters telling it where to start and stop checking. And line 8 is really unnecessary. Much better is to enumerate the _reversed_ num. Gi More
First-shota243 2 1
Cool. Especially the - grid[row][col] part. ;-) In slicing, max is unfortunately necessary, since -1 has a different meaning. But min isn't necessary. r[max(0, col-1):col+2] works fine. More
SavedText(list)-flpo 2
You can use a few more batteries. :-) More
Shortest? 52 - Kill me now-StefanPochmann 2 2
https://www.youtube.com/watch?v=sn4BqpI1p6E :-D More
First-pohmelie 1
Now when people ask me how dimpleqonx works, I'll just point them to your code. Thanks. :-D More
scan circle perimeters with variable step-ayubutrym 1
Nice adaptive algorithm, but you're doing one thing wrong: when using tau, never say 2*pi in the comments. If you are True Believer in Tau, then you know it is more elementary than pi. If you feel you must "explain", use "turn" or "full turn". ;-) More
test corners & split undecided-juestr 1 1
Very nice approach! Is this exact (up to the float inexactness)? I think it is. More
First-mquintus 1 2
Nice and recursive. That "except IndexError" is a leftover from when you didn't realize that negative indices would just wraparound, right? :-) More
TRY the f-string!-DahliaSR 1 1
This is one of examples where f-string is a total overkill. Of course, a + b is much better than f"{a}{b}". More
Second?-EcNeu 1 1
Line 6 can be solved with filter and str.islower (you don't need re). Line 7 is just a collections.Counter. And once you have a Counter, it's easy to see the most common element. copy? Why?! :-) More
Tail recursion-smilicic 1
You know this is _not_ tail recursion, right? :-D More