57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 1 day 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-Franky 1 1
Again, much duplication of code. for limits in '09 az AZ'.split(): if not re.search('-'.join(limits), data): return False (You can even use `all` with a generator expression.) More
Number of bits estimate with log2-Ocus 1
But why? >>> 5 .bit_length() 3 And hey, one shift is better than two. :-) (second & (1 << col)) >> col ~~~> (second >> col) & 1 More
First-kodix09 1
Too much logic. It could all be done with much less branching. More
First-santosh.pagare 1 1
Lines 4,5,6: digits = lowers = uppers = 0 Line 1: unnecessary. :-) Lines 8~13: digits += c.isdigit() lowers += c.islower() uppers += c.isupper() or if you insist on using unbound method, remove initialization and just say digits = sum(map(str.isdigit, data)) Lines 15~18: More
start in north-west, go probe-dist south, then go probe-dest east, then find compatible location with probe-dists-jmegner 1 1
Python is not Java. Not every API should be a single method of an ad hoc class. distance could be just a function. And calling it as distance(point1, point2) is more in line with commutativity than point1.distance(point2). (Not quite related, but useful hint: use math.hypot.) Alternatively, Python More
Shorter-maxadamski 1
First, if you use ord for the first one, you can use it for the second one too. And then you have a nicer way to do it: ax, ay = a.encode() bx, by = b.encode() Also, you can exploit symmetry more in that return, saying that one of those differences is signed, while other is unsigned. More
First-rojeeer 1 1
The whole point of // is that you can ignore the remainder. So you don't need -1 in line 5. :-) And then you see that you use l//2 three times, so it's nice to name it beforehand. (Which is BTW a reason why you named that len a very short name. **Important lesson**: whenever you use a one-letter na More
First-Uladzimir 1 1
You know you don't need [2:]? :-) More
First-blueBlood 1
That triply nested ifs are a bit more complicated than needed. Lines 13 and 14 shouldn't check conditions in that order. Alternatively, lines 15 and 16 should use "elif". Also, " ".join might be useful to know. More
Simplified stack solution-bsquare 1 1
Now, isn't that much better? B-) More
First-martin.beseda.3 1
"len(stack) != 0" is more simply written as just "stack" inside conditionals. Sequences can bool. :-) More
Perpendicular-bryukh 1 1
Way too complicated. Use complex numbers. ;-) More
Dumb Vampire-obone 1 1
Deque might be better as an underlying type for the Army. More
mybest-nennogabriel 1 1
Too many "list"s (in cols). You don't need () around '\_\_\_' in lines. You don't need 0 and 9 (len) in slices: inline[::4]. If you're really obsessed with speed, try inlining diags and cols. Also try extending rows directly instead of copying. More
Set-mlahor 1
`set` has a much more versatile API than just "make null, add, and count elements". :-) Also, it's very nice to use `string` for `punctuation`, but whitelisting is more useful than blacklisting. See my solution. More
English to Braille Translator-vinc 1 2
Line 27 can be del braille_out[-1] Also in line 19, you should learn about str.ljust method. It's useful. ;-) In line 10 you don't need a dict: .update(zip(... is ok. Height and width of a Braille character are not likely to change. You seem to me like person defining M = 12 # number o More
First-Fettn 1 1
A few stylistic remarks, and a big problem: * a-b>0 is much clearer written as a>b (you use it 5 times, and inconsistently) * [building[0],building[2],building[4]] can be written as a slice: building[::2] * you can just say: numberBuildings+=visible at the end, bools know how to count. * The More
Strip Teasing-caldeius 1
That's how I planned to call my solution, bit there might be children around. 😛 More
Second-smilicic 1
Wow. One of these rare tasks where list actually _is_ the right data structure. ;-D More
Hack?-LukeSolo 1 1
Eta-reduction applies here: checkio = \_\_builtins\_\_['s''um']. And as you see, + is not needed. ;-) More