57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 21 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
literally Counter-veky
This is small enough that it can be encoded in a moderate-sized Life grid. ;-) More
normal quine-wdv4758h
Nice. While you're writing in Python3, you could have used .format for greater readability. :-) More
First 'Wau-Faibbus
Cool. It embodies the spirit of Vi Hart's video very nicely. :-) More
First-michael.kej
delta is ok, but names d0 and d1 are semantically empty. Much better would be not to use them at all. delta = date(*date1) - date(*date2) More
First-michael.kej
You could have used enumerate. And slicing. And sum. :-) More
First-michael.kej
Lines 6~9... wat? :-] return [minr, minc] Also, code duplication is horrible. Factor it out? More
First-michael.kej
Condition in line 7 is really strange. What is it doing there?? Also, int(round(blah, 0)) is just round(blah). And if you really use Py3, those / are truedivs. Don't write -2.0, write just -2. (Or better yet, cancel -1 and use 2.:) More
First-michael.kej
Clear?? Hm... classifying commands according to len? And checking "if letters != []" instead of just "if letters"? No, sorry. Not clear. ;-P More
First-michael.kej
That's one horrible code duplication. But more importantly, it doesn't work, does it? verify_anagrams("a", "ab") More
First-michael.kej
Lines 1 and 2: LOL. :-) Sometimes it is easier to just bite the bullet and write what you really mean. parens = {"(":")", "[":"]", "{":"}"} You could have simplified line 12 by putting one lion in Cairo first (see my solution and respective comments for explanation;). More
First-michael.kej
Clear? O RLY? :-D That -1 is eyestabbing. :-] More
First-michael.kej
If you really wanted to be _clear_, you'd probably use .count('1') as before. ;-] n &= n - 1 is a nice trick, but not really "clear" IMO. More
First-UndeadMonkey 1
letter.isupper() is what you're looking for. ;-) Also, don't use Schlemiel the Painter's algorithm without understanding. :-] More
First-Mycroft0121 1
Yes, you should have used a dict. (Rule of thumb: if it would be an ordinary switch (with breaks after every case) in C, it is not if/elsif/elsif/else in Python. It is (probably) a dict. If it is too complicated for a dict (code differs, not only data), then it is a class. But it's almost never a bu More
triangle-gyahun_dash 1
Nice formula. How did you get it? :-) More
max(0,col-1)-EcNeu 1
Title can be written as col-bool(col). ;-) Lines 8~10: second = sum(...) - grid[row][col] BTW, pattern as in your lines 3~6 and 12~15 can be written as first = row != 0 and sum(...) third = row != len(grid) - 1 and sum(...) More
Simple-BoguslawKalka 1
Assigning something to a name just to return it afterwards, _especially_ when that name is the name of surrounding function, is really unnecessary. It would be much better to write def area(self): return self.width_WE * self.width_NS and so on. More
First-Taca
You used list() seven times. _None_ of them was necessary. This must be some kind of a record. ;-P bin(n)[2:] is nicer written as format(n, "b"). Padding with zeros is common operation. See str.zfill. (And max is also nice.;) In any case you don't need _three_ cases. Just two. [0]*(a-a)+l is l. More
First-Taca
Argh, too complicated. Have you thought about a nicer data structure than the sequence of strings? :-o And what do you think line 4 is doing? :-/ You don't need () after while. else in line 18 doesn't do what you probably think it does. Line 10: if not route: More
First-Taca
It's nice you learned to use "in", but you can do better. if i.startswith("POP"): ... More