57
veky
22 48 64 Leader of the month
44583/ 53887
Last seen 14 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
Datetime import-theholy7
Instead of stuffing components of date1 (and date2) separately into date initializer, you can splice them at once: date1 = datetime.date(*date1) Also, you don't need outer parentheses in last line. More
cryptic-coells 1
ROTFL. Although it has some cases where it doesn't work (there are other chars in letter and number blocks that are not letters nor numbers), it did make me laugh. You can make it even more cryptic if you want: checkio = lambda data: len(str(len(data))) > 1 > __import__("functools"). More
First-tuxninja
This doesn't really make sense. But you know that, right? :-) More
Second-tuxninja
You don't need "+" in your regexen (you even don't have it in the first one:). And you don't need r here, though maybe it is good to always write it to remind you of regex parsing. But the last one then really ought to be \d. ;-) Also, you don't need bool around the first condition, and even on the More
First-tuxninja
Nice reorganization into tens and dups, but the code has some horrible duplication. You can do much better. ;-] Here is an interesting approach, that tries to stay faithful to your algorithm. Of course, if you're willing to depart a little from your original algo, you'll be able to write much bette More
Functional DP-nickie 1
Yes. :-) But why do you listify p[-1] at the end? More
66 :-O-veky 1
Honestly, this surprised even me. :-D More
First-martin.beseda.3
Too complicated and ad hoc. BTW you don't need () around num%3 and num%5. More
First-martin.beseda.3
Again, see collections.Counter. More
First-nennogabriel 1
Nice idea, but you really could just break instead of += 'N'. It doesn't really have a purpose. :-) More
First-Moff 1
str.translate is better. See mine. ;-) More
First-chhyx2008 1
When an identifier (like sum here:) is purple, it's subtly trying to tell you something. Namely, Python already has a builtin you can use here. Also, whenever you see range(len(, you should probably use enumerate. And, len(array) is unnecessary inside []. array[-1] is the last element. "if len(ar More
Most Wanted-silentAp
Again you're writing comments instead of code, misunderstanding the main purpose of Python. For example, line 34. Why is it there?? Wasn't it more to the point to write chr(most_frequent + ord('a')) or, in fact much better, LETTERS.lower()[most_frequent] Those doctests are cute, but a bi More
Brackets-silentAp 1
Line 23: never index by index. Pythonic way is to index a dict. "not len(stack)" is simply "not stack" (twice). And in line 18 it can be reversed for greater clarity. Many of these comments are either completely redundant (like line 8), terminologically wrong (like line 5, Python term is a "sequen More
First-silentAp
Those "names" don't really help, if you must break the 80col boundary. sorted\_data is just one char shorter than sorted(data), and semantically completely empty, while "list\_length" is such a bad name that it should be taken outside and shot. :-P More
fourier simplified-coells 1
Wooow! FT in singledigit number of lines. Totally cool. :-) However, I can't give you more thumbs, since you artificially limit the degree of polynomial. Have you thought about using 1 << expr.count("x").bit_length()? I think it wouldn't slow you down much, and you'd have a general algorithm. More
Second-agdk26
Really too complicated, and not working with Pythonic data structures. get_positions is really criminal in that regard. More
First-kvas
Cool, an object oriented approach. But still too algorithmically complex. More
Shorter-kvas
Elegant and short. Still a complexity class too much (O(n^3)). More
Toposort-veky
Well, this is my solution, so I don't know if it is ok to vote on it. It's just an ordinary topological sort, with lexicographic (native) tie breaks. Nothing fancy. More