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
Bin man-LewisFogden 1
bin(number)[2:] ~~~> format(number, "b") int(b) for b in blah ~~~> map(int, blah) More
Clean and Simple-LewisFogden 1
Lines 2~4: feed, birds, new_birds = number, 0, 1 Line 7 really should have been written if feed <= birds: 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
First-Taca
h, m = map(int, time.split(":")) Also, wouldn't it be nicer to name the subexpression abs(long(e?) - short)? More
First-Taca
LOL. You manage to complicate everything. :-) Line 13: just return i, no need to break first. "if fib[0] == i: fib = [sum(fib), i]" is really funny. :-) More
Ugly, but it works-nathan.l.cook 1
Lines 27 and 28: ok, here you don't encode everything as int, but you do the same for str. Not everything is a string, Python has much nicer types. For example set. ;-) And your string massacre doesn't even work when you have "a-ab" for example. More
Most Wanted and Most Lengthy-nathan.l.cook 1
Yes, probably most lengthy. You should win some kind of award. :-P For example, why do you remove everything from the string separately? for removed in string.punctuation + string.digits + " ": text = text.replace(removed, "") Of course, much easier would be text = filter(str.isa More
Min and Max are just the sugar...-nathan.l.cook 1
Your comments are wrong, but they are interestingly wrong. So you really think line 34 copies something? :-/ Yes, that explains a lot. Please read http://nedbatchelder.com/text/names.html#h_Assignment. (Read the whole document if you can, it will explain a lot to you.) Why line 29? Wasn't it easier More
First-coells 1
I see you started mocking finite tasks too. :-D BTW .format(*divmod(i,60)). And > is not needed. More
super-gyahun_dash 1
Nice idea. But you could inherit much better type, set. And why getmembers as external function, instead of just using .names in connected? More
Because I do-Merendina 1
Interesting. But instead of these ugly "... " spaces, you could have written " ".join((Because, I, do)). Or even use templates: "{Because} {I} {do}!".format( Because="I", I="love", do="Python") More
set-gyahun_dash 1
Cool. Frozen, to be precise. :-D Even I didn't realize you could use .issubset with filter (I was messing with .\_\_contains\_\_, but it was currying in the wrong order - this is beautiful.:) Line 16 is also nicer than mine - great job! And "default constructor" is a nice touch. You know what, I'm More
translate-Merendina 1
LOL. Nice approach. But doesn't it bother you to have such enormous duplication? sum(any(p.translate(str.maketrans("abcdefgh12345678", to)) in pawns for to in ("_abcdefg01234567", "bcdefghi01234567")) for p in pawns) Of course, you're welcome to name various parts of it as you see fit. More
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
First-hanpari 1
Here _you_ use superfluous []: all([...]) instead of all(...). ;-P And, independently: doesn't not any(...) seem better than all(not ...)? Of course, none(...) would be best, but too many builtins are probably wrong idea. :-] More
First-hrvoje
Deeply buried in those comments and asserts, there is a solution that is same as mine. :-D 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