57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 12 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
Tread carefully...-veky
This is just one example of how PEP 479 is bad for Python. Another one is at https://py.checkio.org/mission/merge-intervals/publications/veky/python-3/generator/#comment-54572. More
IlovePython-udg23
It seems I'm not the only one getting strange compliments on CiO. Python gets them too. :-D More
First-udg23
I'm not absolutely sure, but I think Py2 also gives you better way of calling replace: ','.join(phrases).replace("right", "left") More
First-udg23
Lines 5 and 7: if i in "([{": if i in ")]}": Line 15: You can just return not stack and not error Or even `not (stack and error)` :-) But really, why error at all? It's not that you can recover anyway. When you find an error, don't set error to True, just `return False`. At the end, More
First-udg23 1
Lines 4~7: Again, don't know about Py2, but you probably have .partition. Use that instead of .split, it fits much better. cmd, _, arg = i.partition(" ") For the other try (lines 8, 11 and 12): Yes, EAFP is nice, but sometimes it pays to be practical: if cmd == "POP" and stack: stack.pop( More
Et tu, Brute Force?-veky
Inspired by [bukebuer](http://www.checkio.org/mission/network-loops/publications/bukebuer/python-27/second/?ordering=most_voted) (and Guido;). More
recursive-ciel
`a = max(a, incredibly_long_name, key=len)` is cool, but every time incredibly_long_name doesn't give something longer than a, Python "rebinds" a to itself. Maybe it would be better after all to use if? b = incredibly_long_name if len(b) > len(a): a = b More
First-nemoyatpeace
Well, you said everything about ghastliness... so I won't go there. I'll just say that number of cases being finite is not an excuse to go haphazardly enumerating them. :-) But a more important lesson about how Python namespacing works: you `import` _names_, not objects. Conclusion: you don't need More
First. Very slow - WHY?-znatny_kulish
Why wouldn't it be slow? You're testing all numbers up to 10**5 one by one. :-o More
unicodedata FTW-Faibbus
But you should use it fully FTW. :-P Check out unicodedata.category and unicodedata.combining. ;-) More
Golf!-blabaster
I'd still like to register my general dislike of eval, but here it's overweighted by elegance of this solution. Congratulations, you win one of Veky's fives! :-) And yes, I find it funny that you call it golf, and then use spaces as is proper. :-) As if you're saying, "this is _so_ short, I can spr More
lambda-znatny_kulish
No lambda needed. And no list needed. And in fact no def needed at all. :-D More
I should make this better QQ-robby.daigle
Yeah, you should. :-D For start, study for-else loop. Much better than this insane flag manipulation. More
UGLY : When Coffee Is not an Option-robby.daigle
Lines 16~18: how about if s[-2]: ? :-) More
Obvious-veky
First we take Manhattan. Then we take whichever is smaller of East Berlin and West Berlin... 🤣🤣 More
Lambda-91 :/-zlomovsky
Nice solution. Shows how [DRY](http://www.checkio.org/mission/count-neighbours/publications/veky/python-3/around/?ordering=most_voted) is not always the same as shortest code. And I really like DRY more, but I do enjoy a game of golf here and there. Especially if [I win](http://www.checkio.org/missi More
Second-isisbinder 1
Little Fermat is cool, but I'm more surprised by the fact that 0-something isn't always the same as -something. :-O More
This took longer than I think it should have! Feedback?-zebulan 1
Feedback? Too much duplication and too much low-level code. About that uglier-than-toad line 6... if you want to be a wizard, read http://code.activestate.com/recipes/204297-the-secret-name-of-list-comprehensions/. If you don't, just write the loop like normal people. It's not hard. :-) More
decorators and no table-maelnor
Argh. Your cilog makes my brain hurt. :-) Cool solution. :-) More
Second: efficient-znatny_kulish 1
Please use // instead of / when you actually want int division. More