57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 11 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
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
bytes-gyahun_dash 1
LOL @ line 2. :-) And line 8 is a nice trick, but probably ints[0] & ~0 << rembit would be easier to grok. But seriously... _noone_ but me solved this with Python's library batteries for working with IP? Really sad. :-/ More
First-Fettn
Very repetitive and not very Pythonic - .join should be preffered to += for str: see also http://en.wikipedia.org/wiki/Schlemiel_the_Painter's_algorithm More
First-Moonra
(int(x) for x in bla) is just map(int,bla). "Dozen" is not really a good name for ten, you agree? Numbers inside {} (and 0 before :) are not necessary. And that code could really use one function to be called three times. More
First-brizmus
Whenever you write if bla: return True else: return False please replace it by return bla Also, ints are true whenever they aren't 0, so you can use capital, lower_case and digit as bools (remove >=1). And finally, you didn't have to type those letters a More
First-trevor
Horribly complicated. :-( At least see string multiplication in help. More
First-oduvan
Nice but a bit convoluted. Why that map at the end? Wouldn't it be simpler to just return sum(items)-2*max(onehandweights(items))? More
First-David_de_Rivaz 1
Nice, but too C-ish. :-P Especially (cnt&1) bit (pun intended). :-D More
O(N)-PositronicLlama
Yeah, that's the way to do it. A tip: max can receive a slice. (See mine.) More
A bit hacky-qria
Cool. :-) Expecially three way ^. :-) More
First-abesto
"lambda: 0" is much clearer written as simply "int". More
Lookup-veky 1
Thanks Zanzacar for the idea. ;-) More
For each 20 liner-Zanzacar 1
See your idea realized (lookup solution, to the right) --> More
Oneliner-gflegar
Not bad. Of course, can be shorter. :-) More
First-gflegar 1
Really? No negative numbers? Tests here are really abysmal. :-D More
Commented-Miaou
LOL. This is the reason why I don't comment my code. :-] There would be more comments than code. :-) More
First-jcg
,key = lambda x : (x[0],x[1]) isn't really needed in line 32. More
First-qria
Line 3: nice optimization, but it's not like we have millions of elements. list.index would work perfectly fine. :-) Line 5: str is also just a (kindof) list of characters. "qria" is probably more readable than ["q", "r", "i", "a"]. Lines 37~40: you _should_ feel bad. Not because of hardcoding More
Happy splitting-hanpari 2
So, you see the problem? How can using str.endswith (which is intended for exactly this kind of check) not be clear, and at the same time using c.split(d)[-1]=="" is somehow "clear"? Everybody considers their code clear. That's why this whole category thing is nonsense. More