57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 55 minutes ago
Member for 11 years, 6 months, 7 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-RomanKorbutyak 1 1
Nice and obvious. :-) You could have said for w2 in words_set - {w1}: in line 3, it would make your condition simpler. But check `itertools.permutations`... it is a nice tool made for tasks like this. ;-) A nitpick: why do you check `w2.endswith(w1)` instead of other way? Of course it's equi More
First-xiaozhan 1 1
:-) If you're going to use `len() and`, you can use it in at least two other missions. Try to find them. ;-] More
First-RomanKorbutyak 1 1
[] is probably nicer way to write list(). But this is ok if you really want to be explicit. :-) And if you wrote [], you'd probably be more inclined to write it as a list comprehension, though explicit loop is also fine. More
First-RomanKorbutyak 1 1
`set(blah.split(","))` could have been a separate function, though duplication isn't huge here. But making something a list just so you could sort it and use the result once is an antipattern. That's what sorted is for. ",".join(sorted(a & b)) More
I cheated...-nicuveo 1
You could have made even better: checkio = {'0'*6, '707409', '100478', ...}.__contains__ ;-) More
First-fishiwhj 1 1
Aargh. Don't write C# in Python. And _please_ don't use pseudoHungarian notation. It completely misses the point of Python. Also, learn Python idioms. Many of your lines can be written in a clearer, sometimes even point-free way. In some cases you don't even need to learn new idioms, just use them More
Folding-ale1ster 1
This solution reminds me of that silly task "Count the number of F's". :-D More
difference-McMan 1 1
You don't need list(). And you don't need len() either. ;-) More
recursive sum-McMan 1
Why didn't you just put s=0 in line 1, then you don't need line 2 at all? Also, len() is unnecessary. Sequences are boolable. More
Number Base-RomanKorbutyak 1
Of course you can just delegate to int and inband its ValueError as -1. But let's ignore that. :-) `abc` is a lousy name. `digits` would be much more appropriate, considering what they represent. Using `enumerate` is laudable, but you're doing it wrong. Manual tweaking of index makes it pointless. More
date'n'time-pohmelie 1 1
You get a thumb for most pointless encoding here. :-D More
64 chars-Sim0000 1 1
Mine is shorter, mine is shorter... :-P More
truth table-shota243 1 1
ROTFL. But it would be way more cool if you mapped OPERATION_NAMES to symbols from "∧∨→⊕≡" instead of relying on indexes. This is not maintainable. ;-P More
It can take negative indexes too-borisuvarov 1 1
... except if array is empty, then it cannot. ;-D More
oneliner-tivvit 1
Instead of lambda with \*, you can use `operator.mul`. Or if you don't want to import one module more, you can use `int.__mul__`. int(z) is duplicated, since this is the reverse of usual listcomp paradigm: you need map first, then filter over that. So you can use the building blocks directly. More
First-coells 1 1
ROT13 effect in line 5 is really nice artefact. ;-D But I'm confused... of five lines, you spend one just to introduce a semantically redundant name for the next line (without it, it still wouldn't be longer than line 5, so you weren't concerned of the right margin). Probably the real reason was so More
First-gyahun_dash 1 1
Yeah, at first I thought inheriting from Counter would be a nice idea. However, it's insistance on reducing negative counts to 0 is painful to fight against. Instead of that ugly polynomialize, you could have written something much more elegant: eval accepts a locals() dict as a second argument. So More
First-RomanKorbutyak 1 1
`from datetime import date` might be more appropriate, since you only need that one, and you need it twice. More important: learn about `*` argument splicing. d1, d2 = date(*date1), date(*date2) And a curiosity: `timedelta` knows how to `__abs__`. So you can drop the outer parens. return More
First-enkeyz 1
Why "else: pass"? Those are completely superfluous. More
Building Base-RomanKorbutyak 1 1
`", ".join` could really help you in line 21. ;-) And corners might benefit from calculating east and north separately. More