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
Two solutions-ANTL 1 1
That's not a generator, it's a comprehension. :-) More
Banana-smilicic 1
A man. A plan. Weird error. Banana! On a more serious note, that STAT really calls for `numpy.ndarray` (2x2x2) approach. :-) Indexing is much nicer, instead of that abomination in line 8. :-) And `except: return None` is cleaner written as `with contextlib.suppress(Exception):` (because I really d More
~0my3[_p\x7f{-skunkfrukt 1
Yes, that's how a 7bit washing machine embedded microprocessor would solve the problem. :-D Python has a bit richer data structures on your disposal. :-] (Unfortunately, the code for 8 is not valid ASCII... but neither is its complement. Ah, the good old times of punched cards...:) More
Simple but a bit verbose-UndeadMonkey 1
First, line 5 is if not array: Second, sum is a builtin. You don't have to maintain it manually. Third, indexing from range is just a slice. array[::2]. More
Pigeons with explaination-UndeadMonkey 1
Lines 20~23 are really just one line. Hint: min. Please don't print(str(corn) + " corn is left"). Do print(corn, "corn is left") print is smart enough to strify automatically, and even to put a space between. ;-) Lines 2~3: pigeons = minute = 1 More
cheat \^.^/-bunnychai 1
Many other cheats are possible. See my solution for possibilities. :-) More
Newton method-Sim0000 1 1
Have you tried counting iterations? You might be surprised. ;-P More
Simplified stack solution-bsquare 1 1
Now, isn't that much better? B-) More
auto-painting-bunnychai 1
Great! BTW you don't need [] in argument for join. More
First-UndeadMonkey 1
numstring is semantically empty, str(number) says the same thing in a clearer way. You could even iterate for digit in map(int, str(number)): You don't need != 0 in line 7: if digit: answer *= digit More
First-fishiwhj 1 1
Line 18 is wrong. rounded gamma is _not_ necessarily equal to 180 - rounded alpha - rounded beta. BTW why do you reinvent the wheel (in this case, builtin round function)? More
Set-mlahor 1
`set` has a much more versatile API than just "make null, add, and count elements". :-) Also, it's very nice to use `string` for `punctuation`, but whitelisting is more useful than blacklisting. See my solution. More
First-andrea.manno1 1 1
Instead of args, you could have cached \_\_repr\_\_ itself. ;-P But really, why all this caching? You're just making it harder to mutate Buildings afterwards. More
Simple and fast!-DahliaSR
Yes, it's fast. But I wouldn't call it "simple". You have duplicated code fragments at two places in the code, leading you to name lambdas - which is not as bad as PEP8 makes it seem, but still can be avoided. First one is easy: if day != current_day: current_day = day total += More
Duh-StefanPochmann 1
Try it on a numpy array. :-P Empty excepts are not ok, not even here. :-] More
whatever-StefanPochmann 1
That max with 0 seems really ugly in a Clear solution... having another if would be too much for you? :-) More
Quasiperiodic-veky
The same as [Aperiodic](https://py.checkio.org/mission/periodic-table/publications/veky/python-3/aperiodic/), only readable. :-D If you ever wanted to see how that one worked, but didn't have courage to tackle it. :-] More
First-StefanPochmann 1
Yup, that's factored. But since you already use the slice in line 7, it would help you in line 6 too. ... or parts[-1:] != ['..'] More
HUHU-dangyi1115 1
What's the point of having a good solution in the docstring, and then an inferior one in the code? More
Regex and max-kkkkk 1
`max` has a `default` keyword, too, which you can use to avoid lines 5 and 6. Also, re's forward looking might help you so you don't have to extract `group(0)` as a separate operation. More