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-gyahun_dash 1
Cool. But don't you think there's an easier way to do what you do in lines 16~18? Also, condition in line 12 is more usually written as "if not shortages". More
Complex rotation-smilicic
Cool. But you really could have used what you imported from math, instead of that while. ;-P More
divide-McMan
Nice reinventing the wheel (fractions.Fraction, in this case;). :-P More
ask myself-gyahun_dash 1
I think this is the only usage of generator.send I have seen on checkio. :-D More
The operator module-EnCuKou
ROTFL. P.S. Even I'd never be so bold to import * from operator. :-D But you handle it excellently. :-) More
brainf**k_nonlocal-ciel 1
You don't need nonlocal. buffer doesn't have to be nonlocal at all (since you don't rebind it), and ptr can be just an argument. def BF(s): buffer = ... # how about defaultdict(int)? Much cleaner. def execute(s, ptr=0): ... ... ret += execute(s[i+1:], More
First-binilnilquad 1
You mean, checkio = lambda a, b: sum(map(int, bin(a^b)[2:])) ? :-) That's nice, but reusing names like that is really weird. If you put it in Creative, you'll get another thumb. :-D More
First-binilnilquad
Those two if-elses are unnecessary. If you really wanted to handle the case of empty data (despite the precondition), you could have done it like this: if length % 2: ... #handle the odd case elif data: ... #handle the even case elif is useful, empty list can be sorted trivially, and pytho More
classic dp -sndnyang 1
Lines 13~16 (and maybe others;) can be replaced with just one. Builtin max is your friend. ;-) More
First-kenaniah
... and all(re.search(p.join("[]"), data) for p in ("0-9", "a-z", "A-Z")) Eliminate duplication. ;-) More
First-kenaniah
You can eliminate line 22 if you assign tail='' instead of None. str is a sequence, None is not really a good fit there. More
transposed-acman
Now do this one using enumerate. It's not so simple as it seems. ;-D More
First-Blastus
This reminds me of the frog's answer to the question why he likes his lungs. ;-D More
First-ablikexe
... except when it [isn't](http://www.checkio.org/mission/i-love-python/publications/veky/python-3/magnum-opus/). ;-D More
First-Paul92
Trust me, your "normal" way is just the way of the programming language you learned before (most probably C). It's not normal in any absolute way, just more popular. :-] More
First-Naoy
"for years and years"... probably, if you switch to Py3. For Py2, I'm not so sure... More
First-pynathan
You could have returned just a slice of a. ;-) More
First-lunaoesed
You don't need () after if. Simple rule for (): after blue no, after purple yes. ;-) More
Three words-lunaoesed
Nice, but when you learn about slices it will be much simpler: for w0, w1, w2 in zip(pal, pal[1:], pal[2:]): if w0.isalpha() and w1.isalpha() and w2.isalpha(): Or even, if you like pointfree writing:-), for troika in zip(*(pal[i:] for i in range(3))): if all(map(str.isalph More
The Most Numbers-lunaoesed
Again, min and max are purple. What does it tell you? ;-) Also, line 4. "if args:". More