57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 11 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
First-marshall.zheng
You're reinventing the wheel. See Counter in collections module (standard library). More
First-bukebuer 1
Nice usage of pop, but the variable s is used in a really weird way here. (With "nonlocal" it would be funnier.:) Those "+=" are in fact just "=", and "initialization" to 0 isn't needed. Also, pop could be used in both branches (or better, before "if"), so condition could be simplified. Also, I h More
Pandemonium-veky
This is just to show various methods your system can be cheated. Fix these, and I'll find new ones. :-P More
Restricted Prime-shreekar
Reverse Eratosthenes. Cool. :-D BTW, set([]) is just set(). More
First-Amachua
That's the algorithm I used. Thanks for writing it in long form. :-) More
First-gflegar 1
Really? No negative numbers? Tests here are really abysmal. :-D 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-htamas
Nice usage of Zeckendorf's theorem. ;-) BTW it would be more scary without that friendly looking boo-ghost. ;-D More
Having fun with for/else-Bilou06
I think this is the first time I've seen an unconditional break at the end of the loop. :-) BTW you don't need line 28, Python is smart enough to return None if there is nothing to return. ;-) More
Second-ciel 1
Better, but still not universal. Where previous worked for under 2\*\*32, this one works under 2\*\*100. :-] Python's recursion is not a way to code iteration. http://neopythonic.blogspot.com.au/2009/04/final-words-on-tail-calls.html More
Third-ciel
Someone has added precondition. So all of your previous codes also work. Sorry. Yes, this one works for all nonnegative m and n. 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
First-dirk86 1
Sorry, *= max( , 1) is very unclear to me. But this is obviously ridiculous. Everybody considers their own code clear. More
Floatless-htamas
Cool. Mine is also floatless, but in a much more boring way. :-D BTW, all these expr if decimals else 0 are just expr*bool(decimals) 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