57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 17 hours ago
Member for 11 years, 6 months, 23 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
Components-george.blackthorn
`while bool(blah)` is exactly the same as `while blah`, only slower. You can also write `while bool(bool(bool(blah)))`. :-D And that `next(..., False)` pattern is much better expressed using EAFP in line 6, and simple `any` in line 11. More
First-Archagiel
Not speedy. Also, "data" rebinding is confusing. Just return it. More
just-VladBark
I see double! :-P And `True if (True if f == s else False) else False` is not really helping. Just return `f == s`. More
switch-VladBark
Where's the switch? :-o And line 33 should be killed with fire. :-P More
First-deepenpatel19
Why don't you sprinkle a few more float()s around your code? :-D Or simply use a normal Python. More
First-deepenpatel19
You have a weird definition of "flag". :-) More
First-Undinushka 1
Don't you think your code could use some refactoring? :-) Also, everytime you write if condition: return True else: return False a little python dies. :-P More
O(n^4)-ablikexe
A kinda classical Dijkstra with sentinels. Few points: k loop should be constrained better: r*c is just a horrible upper bound. Instead of that cute "min", you can have a full if statement, remembering if you changed anything, and if you didn't, you break the outer loop to return. That indentation More
... because dunders make good clarification-smilicic 1
... not. :-P list(map(blah.__getitem__, days)) [blah[day] for day in days] compare. --- BTW do you write (2 * 5) + 3 ? Then don't do the same with Boolean multiplication and addition. :-P More
Short, but boring.-hrvoje
Every time you map a lambda, a python dies. :-P map(lambda variable: whatever, sequence) ~~~> [whatever for variable in sequence] More
Dictionary lookups-johngraham
Ah, a butchering of a nice algorithm. :-P def checkio(data): arabic = dict(I=1, V=5, X=10, L=50, C=100, D=500, M=1000) roman = dict(zip(arabic.values(), arabic)) def fragments(): for exponent, digit in enumerate(map(int, reversed(str(data)))): More
Newbie over comments?-johngraham
This is not "as efficient as possible", but you already know that. :-) It is also not as concise as it could be. Look at [this beauty](https://py.checkio.org/mission/the-longest-palindromic/publications/veky/python-3/although-straightforwardness-beats-speed/). :-) And yes, comments are not really More
Ugly piping-smilicic
OMG. filtering a lambda, then listing it, only to iterate through it. Hard to believe this wasn't intentionally ugly. :-P How about for b, w, n in states: if n == n0: (Indenting 2 spaces is acceptable in such situations, if you're stingy with line lengths.) --- states[(b, w, n)] More
One line formula-ermichin158 1
LOL. Yes, sort might be unnecessary, but doing it twice... :-o And it even isn't one line. :-P More
But! It's work!-ermichin158 1
Category doesn't mean "it works". :-P More
Clean-ermichin158 1
"Clean" doesn't mean "long, repetitive, subatomic and boring". :-P More
List and join-ermichin158 1
It's much better to use if command.startswith('POP'): since when you change POP to something else, you'll likely forget to change the 3. Also, line 5: if queue: More
Me + you = <3-ermichin158 1
I object to line 9. :-D Otherwise, nice solution. More
A mysterious one =)-ermichin158 1
You could have written it even longer. Though I don't really know how. :-P More