57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 13 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
map(chr)-curious_k 2 1
You could have written `range(ord("a"), ord("z")+1)` for maintainability. :-D More
Shortest? 52 - Kill me now-StefanPochmann 2 2
https://www.youtube.com/watch?v=sn4BqpI1p6E :-D More
All the Romans (there are no romans left)-oduvan 2
You could have just slapped `functools.lru_cache(maxsize=5000)` on your `dec_to_rom` and call it `checkio`. :-P More
Radiation eater-LukeSolo 2 1
Line 21 would probably be easier to parse if you'd filter a set to get a set: {(x+1, y), (x, y+1), ...}. And when you see this, it's even better to write do\_not\_hurt as a _set_ of possible indices, and just intersect your set of offseted positions with it. Also, when you have a set of possible in More
two lines-VladBark 2
`''.join([...]) ~~~> ''.join(...)` More
SavedText(list)-flpo 2
You can use a few more batteries. :-) More
First (ugly?)-g.david.krupicka 2 1
Nice handling of empty stack. :-) But the end is just return not stack More
Mark Pilgrim's library-macfreek 2 2
Few nitpicks: * romanNumeralMap really should be a dict. Yes, I know it won't be sorted, but you can sort it by value without problems, and it would probably help readability. * input checking leaves a lot to be desired. What if n is "123a"? isinstance(n, int) (or using ABC) would be much better. More
First-suic 2 1
Nice usage of time module. conv_dict could be much less repetitive if you looked up things like this: m = int(mv) * conv_dict[mm.rstrip("s")] (New TransformDict might help you in Py3.5, if it makes it there.;) And of course, that code repeated twice should be factored out as a function, just More
Encode and check-veky 2
Inspired by an (algorithmically beautiful, Pythonically ugly:) [RRRQ's solution](http://www.checkio.org/mission/striped-words/publications/RRRQ/python-3/first/). More
x0, y0 = positions.pop('Y')-flpo 2
Yeah, I forgot dicts have .pop. :-) More
First-Sim0000 2 1
That brutely memoized factorial is really cute. :-D More
yield from explore-veky 2
I've seen that many people look for my solution of this mission, and they only find the horrible code I've written about three years ago, when I first solved this mission. I think it's a shame. In the meantime, both I and Python have become much better, and this is the result. :-) More
First-blackfaced 2
Nice and short. Few details: * if cells was reversed, it would probably be faster. popping and inserting 0th item is O(n), while for last element it's amortized O(1). * that backslash at line 9 end could be avoided by using de Morgan rule, not a and not b and not c ... written as not(a or b o More
Oneliner-gflegar 2 1
I like it too. :-) Of course, it can be refactored (to remove repetition) as sum(((t-f).days+(f.weekday()+i)%7+1)//7for i in(0,1)) :-] More
First-gflegar 2
Nice recursion. :-) sorted. Lose the brackets. You know the drill. ;-) In fact, I think this would be a good place to teach you about enumerate. for index in range(len(sequence)): do something with index and sequence[index] is pythonically written as for index, elemen More
Perfect Square-goonbee 2 1
A very nice idea. :-) However, the implementation of is_perfect_square could be more robust by using round instead of int. More
TheMostNumbers_so easy now?-GiForce 2 1
It could be even easier. You should usually put normal cases first, exceptional ones later. max(args) - min(args) if args else 0 Or, you can exceptionalize inwards: max(args, default=0) - min(args, default=0) :) More
The Good, the Bad and the Ugly -angapov 2
1. Revolver can be derived from collections.deque with maxlen=6, thus giving you loading logic for free. 2. Those triple-quoted strings are an abomination. Use textwrap.dedent, or just use "\n" like a normal person. :-) 3. A bug: chew_cigar doesn't reduce the number of cigars. 4. Those enemies co More
First-Fedorovich 2 1
This is a nice example of how chaining can help you write better code. First, x == 1 and y == 1 can be written as x == y == 1. Then you see you have it also in equivalence. if x == y == 1 or x == y == 0: Then you see you can factor out x == y. if x == y in (0, 1): Then you realize that More