57
veky
22 48 64 Leader of the month
44584/ 53887
Last seen 21 hours ago
Member for 11 years, 6 months, 6 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
WordsFinder-bunnychai 3 1
re is obviously an overkill here. With the necessary escaping it is even longer than ordinary index (or my approach:). And you don't even use IGNORECASE. Nice use of bisect.insort. :-) That ugly offset calculating can be completely removed, if only you replace "enumerate" with "reversed" in li More
First-Sim0000 3
Why is `check` a separate function? Considering the context, name is not really very semantical. And if you really want a function, for c in filter(check, message) would probably be nicer. More
Using +-veky 3 4
In other words, I think you really need to disallow eval. :-D More
First-bunnychai 3 1
Nice and straightforward. In fact the same algorithm as my solution:-). But function check is really confusing. Line 13 should be just if x*3 in flat: Don't you agree? More
First, brute force (dark force?)-Thenbacker 3 1
Nice and straightforward. bools can be used arithmetically in total += (p>e) - (pMore
Clear and pythonic-nakanohito_piyo 3 1
Namespace dicts are usually initialized via kwargs. dict(e=1, a=1, i=1, ...) [Of course, you might argue whether VALUES _is_ a namespace dict, but I think the readability gain is positive anyway.:] --- Otherwise, as opposed to many solutions that are claimed to be clear and Pythonic, this on More
Sorted-t4n017 3 1
Much clearer: define min_max with its true signature (reverse:bool, *args, key=None) and say min = functools.partial(min_max, False) max = functools.partial(min_max, True) More
Union Find-bukebuer 3 1
Nice UF. But of course you don't need a class. Line 44: You don't need `list()`. In fact you don't need `set()` either. ;-] Line 45: `sorted(eggs, key=spam)[-1]` is also known as `max(eggs, key=spam)`. Timsort _is_ damn fast, but max is linear. :-) Line 19: see `dict.fromkeys`. Very useful and fe More
birth certifiDate-veky 3 1
* jackdied: Does your class have two methods, one of which is `__init__`? * veky: errrm... no? :-) ([context](https://youtu.be/o9pEzgHorH0?t=180)) More
Connecting the dots-veky 3
@oduvan: Much improvement. I usually solve your missions with just one import from stdlib, now I had to use three. :-D More
slice-gyahun_dash 3 1
Cool. Not really general, but here is a nice hack someone might find amusing: you can replace max(0, x - 1) with x - bool(x). ;-) More
Math-bryukh 3 4
int(round(bla,0)) is just round(bla). Also, see "Always use a def statement instead of an assignment statement that binds a lambda expression directly to a name." (new version of PEP8). Otherwise, nice solution. More
completely_empty = lambda *args: globals()['completely_empty'](*args) .....-flpo 2
Next time someone tells me Python is a functional programming language, I'll show them this. :-DD More
First-tdietert 2 1
Putting obvious solution aside, here is your algorithm written in Python, not in some Lisp-Java mix you've written. ;-) def checkio(str_number, radix): import string result, value = 0, (string.digits + string.ascii_uppercase).index for exponent, digit in enumerate(r More
First-shota243 2 1
Cool. Especially the - grid[row][col] part. ;-) In slicing, max is unfortunately necessary, since -1 has a different meaning. But min isn't necessary. r[max(0, col-1):col+2] works fine. More
Clean and simple one liner-dshorstein 2 1
Could be simpler, cleaner, _and_ use less memory if you removed the brackets. ''.join(letter for letter in text if letter.isupper()) BTW .istitle is not exactly the same. It is used when the desired output has only first letter of word emphasized by case. Although the test example gives exactl More
First-qria 2 1
Nice, but can be compressed much further. First, you don't need twice as long items in ALPHABETS, just say text.upper() at end of line 4. Second, once you know that only \w are in your words (and BTW you don't need []s), you only need one item in ALPHABETS, another one can be deduced with [A-Z] a More
Like pulling teeth-gileadslostson 2 2
You're aware that you wrote the same thing three times? :-) More
x0, y0 = positions.pop('Y')-flpo 2
Yeah, I forgot dicts have .pop. :-) More
Functional generator-nickie 2
chain(*map(f, l)) is what you're probably looking for. ;-) (And it has nothing to do with ChainMap.:) More