Nov. 23, 2017, 1:46 p.m. |
+ 1 |
for Comment
veky: Nice and straightforward. But Dijkstra is massive overkill. The point is, there are only two paths (...
|
Nov. 23, 2017, 1:44 p.m. |
+ 1 |
for Comment
veky: Well, that's exactly why UserDict exists (precisely, why it still exists in Py3k). It is much closer...
|
May 1, 2017, 11:38 a.m. |
+ 1 |
for Comment
ant443: Nevermind, I found my answer here: https://www.reddit.com/r/Python/comments/44dm7i/what_would_you_ca...
|
Oct. 26, 2016, 10:02 a.m. |
+ 1 |
for Comment
Thenbacker: That's one slick one-liner, long live itertools!
|
Oct. 5, 2016, 1:12 p.m. |
+ 1 |
for Comment
oduvan: I would put it in creative category
|
April 6, 2016, 2:28 p.m. |
+ 1 |
for Comment
e-l: Thank you for the comment. You're quite right ( **q** was a depth counter for the puprose of recursi...
|
March 11, 2016, 12:11 p.m. |
+ 1 |
for Comment
DiZ: `range` in Python is _exclusive_. If you want `l = [1, 2, 3, ..., n]`, then `l = list(range(1, n + 1...
|
March 5, 2016, 8:18 a.m. |
+ 1 |
for Comment
Sim0000: Only 14 pattern! Yes, that's right :-)
|
March 1, 2016, 1:49 p.m. |
+ 1 |
for Comment
spoty: '\D+ \D+ \D+' it's shorter :)
|
Feb. 23, 2016, 5:24 p.m. |
+ 1 |
for Comment
JMichaelis: Nice, clear solution. The cast to str(int(c.isalpha)) returns the same result as your if clause '1' ...
|
Jan. 30, 2015, 3:54 p.m. |
+ 1 |
for Comment
bryukh: Special Thanks to @Sim0000, @bukebuer, @gyahun_dash, @Hartrik, @veky and @hanpari!
|
Dec. 15, 2014, 12:23 p.m. |
+ 1 |
for Comment
bryukh: "default" is simple and pleasant syntax sugar in 3.4.
|
Nov. 22, 2014, 4:35 p.m. |
+ 1 |
for Comment
bryukh: > And thank you for featuring my solution It's hard to skip it. Thank you for these really interesti...
|
Nov. 6, 2014, 12:57 p.m. |
+ 1 |
for Comment
Sim0000: I try to examine. * vote: score (detail) * +0: +8 (only publish) * +1: +23 (8 + 15) * +2: +35 (8 + 1...
|
Nov. 3, 2014, 4:51 a.m. |
+ 1 |
for Comment
bryukh: You found it! You are first, gratz! :-) Honestly we are using reducing coefficient and for the first...
|
Oct. 18, 2014, 5:23 a.m. |
+ 1 |
for Comment
blabaster: Yes, it works. I think, dict and derivatives are good for sparse data, like Conway's life (I mean in...
|
Oct. 15, 2014, 10:33 a.m. |
+ 1 |
for Comment
blabaster: For this case cache is waste of time. Neighbourhood calculation is easy, if reasonable organized (in...
|
Oct. 6, 2014, 3:29 p.m. |
+ 1 |
for Comment
vinc: sum(sum(r[cs]) for r in grid[rs])
|
Oct. 5, 2014, 6:55 a.m. |
+ 1 |
for Comment
Sim0000: x-(x>0) is more shorter :-)
|
Oct. 1, 2014, 5:30 p.m. |
+ 1 |
for Comment
veky: Cool. Especially the - grid[row][col] part. ;-) In slicing, max is unfortunately necessary, since -1...
|
Sept. 20, 2014, 11:38 a.m. |
+ 1 |
for Comment
veky: Yeah, at first I thought inheriting from Counter would be a nice idea. However, it's insistance on r...
|
Sept. 19, 2014, 3:13 p.m. |
+ 1 |
for Comment
veky: Don't write comments, write Python: https://docs.python.org/3.5/howto/regex.html#non-capturing-and-n...
|
Sept. 16, 2014, 10:03 a.m. |
+ 1 |
for Comment
veky: Hm... do we know that new encrypted message will always be shorter than the old one? Or at least tha...
|
Aug. 29, 2014, 5:04 p.m. |
+ 1 |
for Comment
ale1ster: I think that it would be better not to view the other solutions, but instead hints to the "tricks" u...
|
Aug. 29, 2014, 3:38 p.m. |
+ 1 |
for Comment
artemrudenko: Somewhere in Python docs i have found that None should be checked using the following snippet: value...
|
Aug. 15, 2014, 7:20 a.m. |
+ 1 |
for Comment
artemrudenko: Small addition is that you can replace 'sorted(enum(rods), key = lambda ir: ir[1])' with 'sorted(enu...
|
Aug. 2, 2014, 7:59 a.m. |
+ 1 |
for Comment
veky: Of course it's hard to read, when you've written it in Haskell. :-D Python is not really optimized f...
|
July 30, 2014, 5:45 p.m. |
+ 1 |
for Comment
veky: avoidable(p, q) = all(map(int.__ne__, index(p), index(q))) Many people don't know map can take more ...
|
July 25, 2014, 3:59 p.m. |
+ 1 |
for Comment
veky: No, I meant the literal first sentence. > This document gives coding conventions **for the Python co...
|
July 24, 2014, 3:14 p.m. |
+ 1 |
for Comment
veky: This is an original reducer. :-) Since you use Fraction and reduce only once, it would probably be c...
|
June 1, 2014, 6:54 a.m. |
+ 1 |
for Comment
pohmelie: The difference between *map and zip is laziness. So, in this case you are right, definitly better to...
|
May 12, 2014, 2:57 p.m. |
+ 1 |
for Comment
Cjkjvfnby: > For example, if I write the following code, do you have the same comment? No, this code is styled ...
|
April 3, 2014, 3:14 p.m. |
+ 1 |
for Comment
veky: Well, I don't think they will be "integrated", precisely because of such things as your example. It'...
|