57
veky
22 48 64 Leader of the month
44584/ 53887
Last seen 23 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
Using list count-johngraham 1
str also has .count. You don't need a list. More
FIzzBuzz-DillonKo 1 1
Why parens? You can even say if not number%15: without parens. More
Two solutions-ANTL 1 1
That's not a generator, it's a comprehension. :-) More
First-Juge_Ti 1
angles really could have been a list of dicts, not of tuples. At least namedtuples. angles[1][0] just seems incredibly unpythonic to me. :-) And you could have imported radians from math, it would help readability of your radians function. 648000 is a really magic number, it only reminds me of "648 More
13-liner: justify yourself-przemyslaw.daniel 1
Ah, distributivity: the cute way to write ' ' * (by + (index < to)) with only one pair of parentheses. :-D More
First-mikejonson 1 1
And you'd get double the points if you got rid of the pointless duplication. :-P More
First-gflegar 1
This is a nice place to teach you about *-calls. First, i+j\*1j is complex(i,j). That is not so exciting. But if a=(b,c), complex(b,c) can be written as complex(\*a). In your case, since len(a)==3, complex(\*a[:2]) would do the job. Functions can take their (last) arguments from any sequence, for More
Simplified stack solution-bsquare 1 1
Now, isn't that much better? B-) More
First-gflegar 1
An obvious solution. Just a few hints: frozenset([int(s[0]),int(s[1])]) is frozenset(map(int,s)). frozenset([n,i]) (better written as frozenset({n,i})) really ought to be assigned to a variable, it's used in lines 8, 9 and 13. BTW instead of closing over ts and manually screwing it into pla More
recurrence-bunnychai 1
Argh, float("%.2f" % x)... you really should use the function "round". ;-) More
Dumb Vampire-obone 1 1
Deque might be better as an underlying type for the Army. More
binary logic-bunnychai 1 1
LOL about that "-1" in line 8... isn't it more clear to use slicing? f0, f1 = map(bin(first)[2:].count, "01") More
quine = lambda: code-flpo 1 1
This is cheating, of course. But it's cute. :-) More
Verbatim DP-ale1ster 1 1
Cool idea, can be onelined without much problems. checkio=c=lambda s,w=1:len(s)and max([s[0]+c(s[2:],0),s[0]+c(s[1:])]+w*[c(s[1:],0)]) Especially jarring is "whisker == True" instead of just whisker. Comparing bools to True makes as much sense as adding ints to 0. :-P More
Set-mlahor 1
`set` has a much more versatile API than just "make null, add, and count elements". :-) Also, it's very nice to use `string` for `punctuation`, but whitelisting is more useful than blacklisting. See my solution. More
4th-mlahor 1 1
Yes, it's almost what I wanted. :-) The only problem now is that you have that `i`, incremented every time, when all you really want of is to see whether it's zero---and connected to that, you have two ifs in the loop, one of which is almost always false. More
max() and special()-OrginalS 1
If you're importing itertools, cycle would be much better fit than count. More
Hack?-LukeSolo 1 1
Eta-reduction applies here: checkio = \_\_builtins\_\_['s''um']. And as you see, + is not needed. ;-) More
First-ciel 1 1
It's fascinating that the same solution, somebody puts under puzzle, somebody under clear. :-P More
Berserk Rook-narimiran 1
You're aware that you didn't have to subtract that 96, right? :-) More