57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 3 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
First-StarkyLife
Switch-pattern in Python is probably much more elegantly implemented with a dict, instead of a bunch of ifs with almost the same code. Also, don't single-exit your functions forcefully. You don't need res at all. Just delete line 4, replace "res =" with "return" in the rest of the code, and return More
First-StarkyLife
You don't need a new function, you can reuse checkio by employing default arguments: def checkio(data, count=0, i=0): ... now you just write code for tricky_data return checkio(data, count, i) BTW count is a horrible name for sum. :-P More
First-oglop 1
Aaargh. My eyes hurt. :-P First, this is a classic example of how to go overboard with names. It would be _more readable_ if game_result was named just `r`. :-P And those comments should really be names. m_diag = r[0][0] + r[1][1] + r[2][2] Or even m_diag = ''.join(row[i] for i, row in More
First-Dlown
Again, too wordy and with strange names (from the perspective of English, `result` is much more common). But generally ok. More
First-frantisek.jahoda 1
:-D Made me laugh. Especially feature-future mixing. :-] More
Probably Clear?-c09nallam
Not clear at all. 20% of it is clear, 80% is redundant. :-P More
One-liner-george.blackthorn
Nice usage of None in slices. Otherwise, meh. :-| More
Az Any-aziz199505
This solution is not good. Besides "special cases are not special enough", and not using modern Python idioms like sorted(), it has a math error. While c1d and b1d are calculated correctly, a1d _doesn't_ have to be 180 - their sum. See http://goo.gl/UMrZNd and the resulting discussion. More
Second Code Ever Written-brandon.sieh 1
> Second code ever written You mean in Python, or generally? :-) More
First-buzzjmd
`>> 1` is very weird in this context. `// 2` is probably better. Otherwise you should also write `% 2` as `& 1`, to be consistent. :-D But, in fact, people often need div and mod together, so Python provides it. That also saves you from writing (otherwise useless) line 4, since len is calculated on More
statistics-veky 1
We don't need no numpycation. :-) More
First-buzzjmd
Ah, you were so close to the simplest solution. :-) `sorted(whatever, reverse=True)[0]` is easier spelled `max(whatever)`. And there is really no need to sort the letters twice. Alphabet already provides them in the sorted order. :-) More
First-buzzjmd
One of them you can establish at once: is_long_enough = len(data) >= 10 More
Second-george.blackthorn 1
Since you're already importing itertools, `accumulate` is not far away. And it could help a lot. ;-) Also, `s + max(0, number-prev-s)` is just `max(s, number-prev)`. ;-) More
A neat solution-ruikang.dai 1
If you call this neat, you have a long way to go. ;-X More
A concise solution-ruikang.dai 1
If you call this concise, you have a long way to go. ;-X More
First-Richard_Lenkiewicz 1
OMG. At least write some function for checking divisibility, if you don't want to do it the canonical way (`if not number % 5`). More
Compare with Roman-veky
[Here](https://py.checkio.org/mission/roman-numerals/publications/veky/python-3/enum/#) is the Roman for comparison. :-) More
Simple solution-kzantar 1
Many things can be summed, at least conceptually. Look at this: remove `replace_map`, and the transformation in line 8 (`board=game_result`), and replace all `sum`s with `''.join`s (or put `sum=''.join` at the start:). Then, instead of checking for `3` and `-3`, you can check for `XXX` and `OOO`. M More
Short-george.blackthorn
It's fascinating that almost everybody who uses chr-ord conjugation for files (a-h), _doesn't_ use it also for ranks (1-8), but uses str-int conjugation. Simple is better than complex. :-) Also, sum(...) is better than sum([...]) on at least 3 counts. :-) More