57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 11 hours ago
Member for 11 years, 6 months, 24 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
... unless you're Dutch.-veky
There are some weird things going on here. For example, I thought Python doesn't have a character type (different from str). I bet you thought so too. Yet look at line 20. Calling ord('aa') raises TypeError, calling ord('a') doesn't, but they are of the same type. It seems Guido didn't really mean More
... because dunders make good clarification-smilicic 1
... not. :-P list(map(blah.__getitem__, days)) [blah[day] for day in days] compare. --- BTW do you write (2 * 5) + 3 ? Then don't do the same with Boolean multiplication and addition. :-P More
Short, but boring.-hrvoje
Every time you map a lambda, a python dies. :-P map(lambda variable: whatever, sequence) ~~~> [whatever for variable in sequence] More
meh-Leonix
Nice regex formation. :-D But seriously, some other things might be improved a lot. String methods, especially .isupper and .endswith, should be considered. More
Dictionary lookups-johngraham
Ah, a butchering of a nice algorithm. :-P def checkio(data): arabic = dict(I=1, V=5, X=10, L=50, C=100, D=500, M=1000) roman = dict(zip(arabic.values(), arabic)) def fragments(): for exponent, digit in enumerate(map(int, reversed(str(data)))): More
Newbie over comments?-johngraham
This is not "as efficient as possible", but you already know that. :-) It is also not as concise as it could be. Look at [this beauty](https://py.checkio.org/mission/the-longest-palindromic/publications/veky/python-3/although-straightforwardness-beats-speed/). :-) And yes, comments are not really More
Lambda-verified parity with a dunder-smilicic 1
First, your list obsession shows again. str is a sequence too. All sequences have .count method. Second, why not just %2 ? Or even better, &1 ? More
Counter + sum -> one-liner-DenisKnyazev
Wouldn't [x] * f for x, f in items be nicer than that horrible indexing? :] More
I think this is the best!-andrewg12
Best compared to what? :-) You can have just one expression, ','.join(phrases).replace('right', 'left') And then you can just stick left_join = lambda phrases: at the beginning. :-) More
:-D :D- -:D -D: D:- D-: D,_-smilicic 1
`_,-1` But seriously... clear? :-D More
Simple maths-ermichin158 1
Meh. In this case, simple is not better than [complex](https://py.checkio.org/mission/humpty-dumpty/publications/veky/python-3/complex-battery-staple/?ordering=most_voted&filtering=all). :-P More
Legibility score: prob*whites-smilicic
defaultdict(float) would be a nice thing to use for jars. But really, there is a closed formula. Go smoke a peace pipe with algebra. :-D More
THAT SOLUTION THO-andrewg12
What you did in first two cases, you can do in others, too. elif operation == 'implication': return not (x == 1 and y == 0) elif operation == 'exclusive': return x + y == 1 elif operation == 'equivalence': return x == y Those OPERATION_NAMES repeating are not giving you anything. Much More
Stars aligned-veky 1
`else: return r`s misaligned. ;-D More
Spot the difference!-veky
(getattr) (*_[::3]) (*_[1:3]) More
11121-smilicic
http://math.bme.hu/~petz/vnsumming.html 😜 More
First-Musidlo
`elif` is there for a reason. :-P More
Pythonic GCD Finder-ermichin158 1
A bit more Pythonic than the previous one, but still not very Pythonic. Line 2 is unnecessary. How many same arguments you'll have? And each of them will clear that inner loop in 2 steps. Line 3 is simply wrong. gcd(2, -4) is 4. And gcd(0, 5) is 5. "greatest" is by divisibility, not by standard or More
Clear pythonic functions comparison-ermichin158 1
Why do you keep thinking your solutions are Pythonic when they _obviously_ aren't? Superfluous comments, duplicated code, and that mortal sin of Python programming, "except: pass". More
Moving on up!-andrewg12
See str.endswith. Your reinvention of it is very entertaining BTW. :-D More