57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 17 hours ago
Member for 11 years, 6 months, 23 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-Moonra
Simple, but effective. A bit repetitive, a function would be nice. More
Recursive-PitiHoubi
"if (len(data) > 0)" is just "if data" data[1:len(data)] is just data[1:] And your whole algorithm is just functools.reduce And in fact already written in Python core, as "sum" builtin. More
First-gres_18
You could have written list(list(list([a,b]))), the effect would be the same. :-P More
First-newdazhu
Straightforward. Not very funny, but ok. More
First-Maj
";" might be funny if everything else was in C style, but "sum" surely doesn't fit there. :-] More
Long string!-tetedemerou
Nice reducing to addition of natural numbers. :-) pattern can be much nicer written using list comprehension: [i in range(b) for i in range(a)]. ;-) More
One line solution-MadHatter
Funny, but: first, Counter is really not needed, max can have key too. And second, tuples can be keys (ordered) - no need for base 42. :-) More
A bit hacky-qria
Cool. :-) Expecially three way ^. :-) More
972 liner-Juge_Ti 1
ROTFL. How much time did it take? :-) More
First-marshall.zheng
You're reinventing the wheel. See Counter in collections module (standard library). More
dict FTW-veky
If you're trying to see how it works: just print(r) between lines 5 and 6. I'm sure you'll see what r is, and then the rest is pretty obvious. (Of course, if there are any questions, just ask.) More
__-Cjkjvfnby 1
Cool. O(2) instead of O(7). :-DD More
Sunflower-veky 2
Let's see who will get the sunflower reference. ;-) More
First-Juge_Ti 1
Sorry for the (unintentional) plagiarism. :-) More
First-mombius 1
Sorry, but popping empty stack is not your only problem. Appending at end is much smarter than inserting at beginning all the time, your dic is "backwards" (aestetics, true, but doesn't it just look wrong to you?:), and those parentheses are duplicated in three places in the code. And oh, that "T More
Monster-veky
I botched it (pressed publish too early). Inner "".join is not needed. More
Oneliner-gflegar
Not bad. Of course, can be shorter. :-) 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-gflegar
Last line is just return s*(n == 1) And yes, you could have get rid of that special case (given your hate for special cases) in line 2. For example, return (s + (not s))*(n == 1) Here you do need parentheses around not, since it is special in grammar. But "not" being special enab More