57
veky
22 48 64 Leader of the month
44584/ 53887
Last seen 22 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
O(N)-PositronicLlama
Yeah, that's the way to do it. A tip: max can receive a slice. (See mine.) More
A bit hacky-qria
Cool. :-) Expecially three way ^. :-) More
First-abesto
"lambda: 0" is much clearer written as simply "int". More
dict FTW-veky
If you're trying to see how it works: just print(r) between lines 5 and 6. I'm sure you'll see what r is, and then the rest is pretty obvious. (Of course, if there are any questions, just ask.) More
Rec-Lambda-Zanzacar 2
Doesn't work on empty list. checkio=f=lambda x:x.pop()+f(x)if x else 0 would be better. ;-) More
Oneliner-gflegar
Not bad. Of course, can be shorter. :-) More
First-gflegar
Last line is just return s*(n == 1) And yes, you could have get rid of that special case (given your hate for special cases) in line 2. For example, return (s + (not s))*(n == 1) Here you do need parentheses around not, since it is special in grammar. But "not" being special enab More
First-gflegar
Again, no parentheses around "not s" are needed. You never need them when you use it as a logical condition, only as an arithmetical expression. BTW sentinel really could have helped here (to reduce number of cases:). See mine. ;-) More
First-qria
Line 3: nice optimization, but it's not like we have millions of elements. list.index would work perfectly fine. :-) Line 5: str is also just a (kindof) list of characters. "qria" is probably more readable than ["q", "r", "i", "a"]. Lines 37~40: you _should_ feel bad. Not because of hardcoding More
Happy splitting-hanpari 2
So, you see the problem? How can using str.endswith (which is intended for exactly this kind of check) not be clear, and at the same time using c.split(d)[-1]=="" is somehow "clear"? Everybody considers their code clear. That's why this whole category thing is nonsense. More
Don't read this-Piko
LOL. Nice code. May I ask, why the strange formatting? More
Recursive (and ugly)-Juge_Ti
We have a very similar solution. :-) BTW, I ROTFLed at 'Aaaaaaarrrrgghhhhh!'. :-D Wasn't it better to raise some appropriate exception? (PermissionError sounds very appropriate.:)) More
4D-veky
As Express Delivery was just A* in 3D (n x n x 2), this is just A* in 4D (4 x 4 x 4 x 4). Precise formulation of analogy is left as an excercise to the reader. ;-D More
First-coells 1
Nice use of default arguments. ;-) BTW why a commented checkio above? A nitpick: wouldn't c if b else a be nicer than a if not b else c ? More
First-coells 1
Similar to mine, but uglier. :-P :-D More
First-coells 1
ROTFL. I admit I was staring at that 1/ for a few minutes. :-D For translated, maybe it would be nicer to first starmap(complex, data)? More
First-coells 1
Awww, iter, finditer, and even _itertools.chain.from\_iterable_. Awww. :-D Haven't you buried the idea of your solution a bit too deep? :-] More
Recursive Boulder Dash.-hrvoje 1
Hm. This doesn't _really_ work, it's just that the tester stops as soon as you reach the goal. It can be fixed (and your solution removed) later. That being said, it's trivial to fix: just use another connective instead of +. Can you see what it is? :-) More
First-gzroger
Aargh. I think I taw a puddy tat... I mean, a semicolon. :-P Please don't write C in Python. It's not just semicolons... comparisons, loops, the whole thing is so unpythonic it hurts. :-( More
First-coells
Nice and modular, although a bit bruteforcish. :-) More