57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 1 day ago
Member for 11 years, 6 months, 7 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-lerikpav 2 1
date(*date1) and date(*date2) could have been used. More
Twisted images in transition-smilicic 2 1
Wow! A surprisingly algebraic (for you) approach. :-D One of those `image`s is really a `preimage`, right? :-) Also, `relation` deserves a better name. Though I don't know what it is. :-/ `precedes`? `P[i] is a` is (PNI) a very risky thing to write. Those are one-letter strings, which are most pro More
Newbie trying to learn Python style-johngraham 2
You're obsessed with lists. :-9 enumerate, .index, and a lot of other things work on many more data structures than lists. And .index can receive additional parameters telling it where to start and stop checking. And line 8 is really unnecessary. Much better is to enumerate the _reversed_ num. Gi More
category awkward-GiForce 2 3
Question category: sad. :-P >>> print(*dir(a)) ... days max microseconds min resolution seconds total_seconds ^^^^ Now any better? :-) More
First-minto 2
w(y,1+i,13)==4 for i in range(12) same number of characters, but easier to read IMO. Of course, the true portable solution is calendar.January + i :-D If you really want to have as few hits as possible, a month has Friday 13th iff it has Friday 6th. And 6 is shorter than 13. :-) More
try except-bryukh 2 1
Every time you write empty "except", a python dies. :-P More
Shortest? 52 - Kill me now-StefanPochmann 2 2
https://www.youtube.com/watch?v=sn4BqpI1p6E :-D More
one liner without quotes-ciel 2
You don't need list in your parade of constructors. ;-) BTW, without quotes is not really a restriction. Try without dots, for example. :-D More
First-laserpez 2
If this is speedy, I'm a C++ programmer. :-D More
String arithmetic-nickie 2 1
Not really puzzling if you know that str times negative is "", but still cool. :-) More
OOP plague-quarkov 2 1
Obligatory Youtube link: https://www.youtube.com/watch?v=o9pEzgHorH0 :-) More
First-sntk 2
Line 6 can be improved in two ways: math.hypot instead of manual calculation, and round instead of int(...+0.5). Double for in line 9 can be written using itertools.product. But not essential. Line 12 is not pythonic. "if not data" (or even better: if data, and reversing branches) is much bett More
vek-StefanPochmann 2 1
Argh - there _is_ a number between 1 and 3 after all! :-D And that is the number of thumbs you get. :-) More
check abcd...z-carlos.gonzalezsanchez.75 1 2
Please use `string.ascii_lowercase` instead of hardcoding. If you forget a letter, you'll notice it too late. And cut out those parentheses. And a.find(b) < 0 ~~~> b not in a Of course, the whole business can be written directly with `all`. More
Simple solving-b-612 1 1
Simple. :-) But read about EAFP vs LBYL sometime. ;-) More
Simple :)-b-612 1 1
Don't ever index by index. You're separating your sequences that should be parallel, which is a maintenance horror. Python has dicts especially for that. def boolean(x, y, op): return dict( conjunction = x and y, disjunction = x or y, implication = x More
Short-tiberiu.lepadatu 1 1
> #I think tihs is the only time my code is as long as Veky's one:) You're [so](http://www.checkio.org/mission/funny-adding/publications/veky/python-3/o-rly/?ordering=most_voted) wrong. :-P More
First-kamitenshi 1 1
First, I know why you put line 7 in the loop, but it's not a valid reason. :-P Especially since then your try/except does nothing. :-] EAFP is cool, but you're doing it wrong. Second, remove len(array) from []. Just array[-1] (or array[~0]). Third, never iterate through indices when you need (only More
It's long and I don't happy with it..-AlexGiesbrecht 1
It's not _so_ bad. I've seen much worse. :-D You even use .index and sum and zip, though for some mysterious reason you _don't_ use builtin min. And why reversed?? Just convert >= to >. Of course, min does that for you automatically. And your big problem is code duplication, of course. Factor that More
Sum of chr-DiZ 1 1
Funny, this is exactly the same length: safe_pawns=lambda p:sum(bool({chr(ord(c)+o)+chr(ord(r)-1)for o in(-1,1)}&p)for c,r in p) More