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 (...
|
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
|
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' ...
|
Oct. 6, 2014, 3:29 p.m. |
+ 1 |
for Comment
vinc: sum(sum(r[cs]) for r in grid[rs])
|
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...
|
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...
|
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 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...
|