57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 14 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-blueBlood 1
That inner while loop, with explicit x management, is unnecessary. for letter, lnext in zip(word, word[1:]): (you might want to end the zip earlier if your snake is too young:). More
ghost-blueBlood
Lines 25 and 26 are just: return age == x + y More
First-blueBlood 1
First, it's not advisable to change (line 39) a dict iterated through (line 33). Second, why line 42? If not x, then surely second not in x. :-) More
First-mastak
[Stolen.](http://www.checkio.org/mission/three-words/publications/veky/python-3/for-else/) ;-) More
First-coells 1
I think I'm setting some disturbing trends here... :-O More
First-james.verran
Take it in stride. ;-]] array[::2], hint. More
sum fun-james.verran
ROTFL. :-D For fun to be complete, you could have used my "slice twice" technique: l[i-3:i] ~~ l[:i][-3:] More
recursive-james.verran
What was your intention here? Perl5 with @_ arg passing? :-D More
First-gyahun_dash 1
The most pointless use of yield from. :-) BTW, line 7 could probably be array.pop(argmax). At least if you say array = list(initial) in line 2. More
First-therin
Local function could help. See my solution. ;-) More
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
First-a7295177 1
Why a list?? You never do anything with it except append 1, increment some element (pointless) and return len. More