57
veky
22 48 64 Leader of the month
44584/ 53887
Last seen 20 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
First-MatthiasWiesmann
"return None" is the same as "don't return anything". You don't need lines 5 and 12. More
very clear lambdas-fishsouprecipe 1
It can be even clearer [without them](https://py.checkio.org/mission/boolean-algebra/publications/veky/python-3/an-operator-by-any-other-name/). :-] More
Solution for float input numbers-archius11
This is a beautiful algorithm. Too bad it's written in Java, not Python. :-P :-D More
simple readable-jcook00
Kinda ok, but _readable_? No. :-P First, CheckiO is not really a version control. And it shows. The previous attempts have nothing to do in the published solution. And more importantly, you're using code comments wrong. (You're not the only one.) First, you "comment out" code and leave that in whe More
First-igor.isay2
LOL... that's a very roundabout way of doing it. :-) Whitelisting is much simpler than blacklisting. collections.Counter(filter(str.isalpha, text.lower())) And why sort before, instead of after? And more puzzlingly, why count from start for each _instance_ of each letter?? More
Mycroft's-Mycroft0121
You really don't need that much code duplication. :-) More
First-igor.isay2
There is absolutely no reason to rebind data here. Just return [item for ... More
Fraction-free GE-DiZ 1
I'm not quite sure what you _get_ by eliminating fractions (since you still do the same operations, just above the big common denominator), but for bragging rights, it's ok. :-) More
xus-ShuaiXu
Nice overflow avoidance. :-) Of course, it would be better to let Python decide. More
xus-ShuaiXu
Using list.append when you want a bound method is _really_ confusing. I advise you reconsider your name choices. ;-] Don't iterate through indices if you need elements. for x in data: if data.count(x) != 1: result.append(x) And what do you think line 15 does?? Hint More
First-asa119
What did you think line 5 is doing?? More
union-find-ciel
There is much easier way to implement UnionFind. Objects don't need to be listed, associative mappings are much more intuitive. ;-) More
First-gflegar
If you're using i from enumerate just to index another sequence (as you do), then instead of enumerate, use zip. for si, r in zip(s, p[1:]): ... use si instead of s[i] ... More
First-gflegar
There is a Counter class in collections module. ;-) More
Obvious-veky
First we take Manhattan. Then we take whichever is smaller of East Berlin and West Berlin... 🤣🤣 More
Explicit formula-Juge_Ti
int(a/b) is a//b. Also, you don't have to round the result: "four digits precision" here means "(at least) four correct digits", which you can see from "±0.0001". More
First-lsdda
You could append fresh [] to result between lines 4 and 5. (Then it would be obvious that it's just a list comprehension.:) But this way is also ok. range(0,bla) is just range(bla). loop in line 5 can be more pythonic: for row in data: result[i].append(row[i]) More
Hmmm... not easy-pakicetus
It's not easy when you're not using the tools you have. :-] Look: You intend to go through str1 and str2 simultaneously. That's what `zip` is for. m = {} for x, y in zip(str1, str2, strict=True): if x in m and y != m[x]: return False m[x] = y return True Now, you check More
First-blueBlood
Lines 2-5: do you know what "precondition" means? :-/ Line 6: data.sort() is more readable and faster. Line 11: I don't get why you float m. Of course you don't need to. Lines 15-19: This is really head-scratching. Why do you do such contortions?? More
First-blueBlood 1
That inner while loop, with explicit x management, is unnecessary. for letter, lnext in zip(word, word[1:]): (you might want to end the zip earlier if your snake is too young:). More