57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 2 hours 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
Counter to the rescue-xtofl
"lambda c: c.isalpha()" has a much shorter name: str.isalpha. Eta-reduction. ;-) More
sum + slice-xtofl
0 is not needed as slice start. [::2] is ok. More
First-xtofl
When you see that pink colored identifiers, Python is trying to tell you something. Use a builtin, don't invent wheel all over again. Also, nitpick: line 3 should be mn = mx = args[0]. More
First-vadim.latypov
res: don't do this. It's much slower with no reason. Use for-else. for x, y, r in previous: if round(math.hypot(i-x, j-y)) != r: break else: return [i, j] (Or even better, use all with generator.) More
First-vanzaj
Cool, but can be done [better](http://www.checkio.org/mission/i-love-python/publications/veky/python-3/magnum-opus/). ;-) (In my defence, I _didn't_ misunderstand the task.;) A minor detail: it was probably easier to use .title, and then convert just L to l with (e.g.) .replace. More
Explicit Selfies-terryyin 1
Namespaces are one honking great idea -- let's do more of those! More
Heuristic and backtracking-ale1ster 1
Lines 4 and 5 are really ugly. See dict.setdefault. More
First-binilnilquad
Those two if-elses are unnecessary. If you really wanted to handle the case of empty data (despite the precondition), you could have done it like this: if length % 2: ... #handle the odd case elif data: ... #handle the even case elif is useful, empty list can be sorted trivially, and pytho More
classic dp -sndnyang 1
Lines 13~16 (and maybe others;) can be replaced with just one. Builtin max is your friend. ;-) More
First-kenaniah
... and all(re.search(p.join("[]"), data) for p in ("0-9", "a-z", "A-Z")) Eliminate duplication. ;-) More
First-kenaniah
You can eliminate line 22 if you assign tail='' instead of None. str is a sequence, None is not really a good fit there. More
transposed-acman
Now do this one using enumerate. It's not so simple as it seems. ;-D More
First-Blastus
This reminds me of the frog's answer to the question why he likes his lungs. ;-D More
First-ablikexe
... except when it [isn't](http://www.checkio.org/mission/i-love-python/publications/veky/python-3/magnum-opus/). ;-D More
First-Paul92
Trust me, your "normal" way is just the way of the programming language you learned before (most probably C). It's not normal in any absolute way, just more popular. :-] More
First-Naoy
"for years and years"... probably, if you switch to Py3. For Py2, I'm not so sure... More
First-pynathan
You could have returned just a slice of a. ;-) More
First-lunaoesed
You don't need () after if. Simple rule for (): after blue no, after purple yes. ;-) More
Three words-lunaoesed
Nice, but when you learn about slices it will be much simpler: for w0, w1, w2 in zip(pal, pal[1:], pal[2:]): if w0.isalpha() and w1.isalpha() and w2.isalpha(): Or even, if you like pointfree writing:-), for troika in zip(*(pal[i:] for i in range(3))): if all(map(str.isalph More
The Most Numbers-lunaoesed
Again, min and max are purple. What does it tell you? ;-) Also, line 4. "if args:". More