38
StefanPochmann
16 38 54 Leader of the month
8984/ 9195
Last seen 1 hour ago
Member for 9 years, 1 month, 7 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
Another simple oneliner-StefanPochmann 5
Shortening it by removing code duplication (but I'm afraid it makes it a little less clear): def create_intervals(data): return list(zip(*(sorted(x for x in data if x+d not in data) for d in (-1, 1)))) And golfed: create_intervals=lambda X:list(zip(*(sort More
Shortest? 52 - Kill me now-StefanPochmann 3
Took me forever to find those index expressions. My progression was: checkio=lambda n:'Fizz Buzz'[(n%3>0)*5:4+5*(n%5<1)]or`n` checkio=lambda n:'Fizz Buzz'[n%-3&-4:4+5*(n%5<1)]or`n` checkio=lambda n:'Fizz Buzz'[n%-3&-4:9-n%5-n*4%5]or`n` checkio=lambda n:'Fizz Buzz'[n%-3&-4:12-(n%-5&8 More
Another simple oneliner-StefanPochmann 3 2
Zip the interval starts with the interval ends. Similar to [my previous solution](https://py.checkio.org/mission/create-intervals/publications/StefanPochmann/python-3/simple-oneliner/), so I could've seen this myself, but really just a corrected and improved version of [Lemmi's solution](https://py. More
First-flpo 2
One character shorter and no "symbols" :-) from numpy import median as checkio More
1-liner: 62 chars? that's it!-przemyslaw.daniel 2 1
Still one character longer than [mine](https://py.checkio.org/mission/house-password/publications/StefanPochmann/python-3/shortest/?ordering=most_voted&filtering=all) :-P But it's trivial to make yours shorter. Why don't you use a set comprehension? More
5-liner: bit by bit-przemyslaw.daniel 2
Dictionary version :-) ```python def calkin_wilf(n: int) -> tuple[int, int]: result = {'1': 0, '0': 1} for bit in f"{n:b}": result[bit] = sum(result.values()) return tuple(result.values()) ``` More
漢字-DiZ 2 1
Just shortened the third line a bit (required changing the characters): checkio=lambda i,r=range:int(bytes(48+min(r(10), key=lambda n:bin(ord('歫⒚玧碧䧭㣏毎ኧ篯㧮'[n]) ^sum(i[o//3][d+o%3]<More
recursion-kurosawa4434 2 1
Extremely inefficient, only O(n^3) time and O(n^2) space. More
~Shortest-veky 2 1
Can still be shortened: checkio=lambda d:[x for x in d if~-d.count(x)] More
Complex is better than complicated.-veky 2 1
Ah, I should've suspected you've done this already. No need for `b` if you use `find` instead of `index`. More
simple-StefanPochmann 2
Alternatively, a little more efficient and maybe clearer: def merge_intervals(intervals): result = [] for interval in intervals: if not result or interval[0] > result[-1][1] + 1: result.append(interval) else: result[-1] = r More
String arithmetic-nickie 2
I finally [beat you](http://www.checkio.org/mission/fizz-buzz/publications/StefanPochmann/python-27/shortest-52-kill-me-now/)... omg that was hard work. Thanks for the motivation :-) More
Heuristic (disprove it!)-ale1ster 2 1
Disproof: From goal state, just swap blue with yellow. You can't solve it because you never turn rings 2 and 3. More
Head, *body and tail.-Tinus_Trotyl 2 2
For example `correct_sentence('I')` crashes ("I." is a perfectly fine sentence, and since a point of the mission is to correct a missing dot, `'I'` is a perfectly reasonable input). Btw, how about `tail.strip(".") + "."`? More
A bunch of one-liners-gleb10101010101 1
Uh... That's not a bunch of one-liners, that's one bunch-liner :-) 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
First-RRRQ 1
Too complicated and inefficient and unpythonic. This really should not be top-rated. More
2D Recursion (96)-StefanPochmann 1
Readable version: def checkio(A, i=0): if not A: return 1 if i == len(A): return 0 return checkio(A[:], i+1) + (-1)**i * A.pop(i)[0] * checkio([r[1:] for r in A]) More
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
1
2 3 4 5 6 7 8 9 10