38
StefanPochmann
16 38 54 Leader of the month
8978/ 9195
Last seen 24 minutes ago
Member for 9 years, 1 month, 4 days
Difficulty Normal
Recent solutions I'm happy with (just starting/trying this): [Words Order](https://py.checkio.org/mission/words-order/publications/StefanPochmann/python-3/short-dict-subsequence/share/5bbb2df54ec5a810d36d7f70ae7e92da/) Dang it no markdown here?

Best reviews / Newest reviews
if total else data-veky 1 1
I'd say removing less than nothing shouldn't remove *everything*, like this does for `remove_min_max({1, 2, 3}, -1)`. More
uno reverse card-viktor.chyrkin 1 1
Inspired by yours: def remove_min_max(data: set, total: int) -> set: for extremum in [min, max] * total: data.discard(extremum(data, default=None)) return data More
Boring-veky 1 1
Wat. Dat line 14. You must've been veeeery bored. More
max len of dict-veky 1 1
Just a variation... long_repeat=lambda l:max(map(len,__import__('re').split(r'((.)\2*)',l))) More
Review please-Komly 1 1
translate is total overkill, just use replace. More
EAFP: Easier to Ask For Pattern-StefanPochmann 1 1
I wasn't in the mood to do checks **during** the pattern-to-number conversion, so instead I just did the operations and afterwards asked myself for the pattern and compared. More
Cycle (de)composition-veky 1 1
Combining your backwards idea with my "speedy" idea of using one lookup per move: ```python from functools import reduce u, f, r, l, b, d = ({'side': i} for i in range(1, 7)) def set(state, *NSWE): state |= zip('NSWE', NSWE) set(u, f, b, r, l) set(f, d, u, f, f) set(r, r, r, d, u) set(l, l, l, More
Generator-veky 1 1
How about... def merged(intervals): if intervals: it = iter(intervals) a, b = next(it) ... More
First-tokiojapan55 1
Could've been clearer without the shift. Put "zero" at index zero, "positive" at index +1, and "negative" at index -1. ```python def determine_sign(num: int) -> str: sign = lambda i: (i > 0) - (i < 0) return ["zero", "positive", "negative"][sign(num)] ``` More
A bunch of one-liners-gleb10101010101 1
Uh... That's not a bunch of one-liners, that's one bunch-liner :-) More
juestr's compressed-veky 1 1
8 chars less: ```python changing_direction=lambda e,p=lambda s:[aMore
sympy can handle permutations-Phil15 1
Somewhat golfed: ```python from sympy.combinatorics.permutations import Permutation fifteen_puzzle=lambda g:Permutation(L:=sum(g,[0])).parity()==sum(divmod(L.index(16)-1,4))%2 ``` More
(n**e**-1)**e==n-veky 1 1
I also like `n in (round(n**e**-1)**e for ...)`, but that of course has the huge disadvantage of not allowing a title like yours. More
Simple simulation-StefanPochmann 1
If I remember correctly, I got that complex number trick from @veky years ago. More
Set comprehension-veky 1 1
Collecting None, sweet. Or is that just to confuse+educate? :-) `0<=ij>=0` would have been nice as well. Or `n>i>-1More
and-veky 1 1
One char shorter: ``` checkio=lambda*a:len(a)and max(a)-min(a) checkio=lambda*a:max(a:=a or[0])-min(a) ``` More
by definition-veky 1 1
LOL... those names... I love it. More
2 line different from Ulam original-dig 1 1
If you're willing to handle float imprecision like that, you might as well use complex numbers. Then you could generate the neighbors of a point `z` simply as `{z + 1j**(i*2/3) for i in range(6)}`, and `almost_equal` of two points could simply be `abs(z1-z2) < 1e-5`. I used complex numbers for the n More
Pochmannia!-veky 1 1
Hmm, now what to do with this... I gave the original +5 for its neat insight/algorithm. I do like this version better, but it didn't give me that same Aha! moment again... More
Shortest? (54)-StefanPochmann 1
Thanks to [james.verran](http://www.checkio.org/mission/end-of-other/publications/james.verran/python-27/endswithtuple/) and [MadCow234](http://www.checkio.org/mission/end-of-other/publications/MadCow234/python-27/the-end-of-other/) for pointing what `endswith` can do. More
1
2
3 4 5 6 7 8 9 10