57
veky
22 48 64 Leader of the month
44583/ 53887
Last seen 16 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
First-smilicic
range(len(... -> enumerate. That's a general rule. Now apply it here. ;-) More
First-Gosha
See collections.Counter. It will help you. ;-) More
First-Gosha
Line 6 can be written as number % 3 == number % 5 == 0. More
First-Gosha
Using not with 2 branches is usually frowned upon. It's better to reverse branches and eliminate not: if array: return sum ... return 0 Even better is to use try. But you're probably too young for that. :-) More
First-Gosha
"if int(digit)" is enough. Or better, to remove duplications of int(...): for digit in map(int, str(number)): if digit: mal *= digit (You can even use filter(None,...) but let's not go there.:) BTW what's "mal" (as a name)? More
First-Gosha
Same as before: if args: return max ... return 0 In new Pythons, you can use default=0 in min and max. More
one-liner-a7295177
Nice "oneliner". :-P But why all those list(...)s? [] are enough. And sum([a,b,a]) is really nicer written as 2*a+b. More
one-liner-a7295177
You can use _and_ for better control flow. ;-) More
Easy-a7295177
What's line 3 for? It was not so hard. :-] More
Half-veky
> The shorter your code, the more remarkable you are. Then I am https://remarkable.com/ :-D More
First-dirk86 1
Sorry, *= max( , 1) is very unclear to me. But this is obviously ridiculous. Everybody considers their own code clear. More
ReFuncPuzzle-nickie
Imitation is the sincerest form of flattery, they say. :-D More
First-coells 1
Your idea of "functional programming" is very strange. Hint: lambdas and foldrs are not everything. :-D See math.hypot, operator.and_, itertools.product, and itertools.starmap. And sorted returns a list already - what did you think, it will return an iterator? :-] More
Third-coells 1
Yes, that's the way (a-ha, a-ha,) I like it (a-ha, a-ha). :-D As a nitpick, I think that manual for-loop could be automatized (written as a real for loop), with while inside to repeat a single pass until d<0. But this is probably ok too. More
Second-coells
A nice variant of my "Ordered" solution. :-) Is there _any_ reason to use d << 1 instead of d*2 (or even nicer, d+d :)? You just need parentheses for it. BTW, in Py3.4, max finally got a "default" argument (despite Raymond's cries:), so you don't need that ugly line 4. :-] More
Second-coells
Nice complex key. :-D But you don't have to search through the whole text, just through a..z. :-) More
First-coells 1
Nice use of next and .find . :-) More
A little weird :)-hrvoje
Please don't use "concatenating digits in a large base" as a method for selecting by multiple keys. Unicode has more than 1e5 code points (if not now, then soon:)). Tuples comparison is exactly meant for this. Key should be (count, -ord). Also, this algorithm has quadratic complexity, while the t More
Recursive, short, weird but works! :)-hrvoje
Nice and complicated. :-P Wouldn't dict be more appropriate data structure for z? More
Look ma, no regex! :)-hrvoje
First, if you _used_ regex here, that would be remarkable. Not using Python re here is like not using a bicycle for swimming. :-D Second, argh. Please don't do if c: return True else: return False if c binds something bool. Do return c Token count just went from 7 to 2. A More