45
Valentin Bryukhanov
http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 8 months, 2 days
Difficulty Normal
Developer, engineer and taskMaker.
Good. Only one remark - 'l' is the bad name for variable, because it very similar to "1" for some fonts. Without syntax highlighting it can complicate the code reading.
More
The nice trick!
lambda x:"+"*x+"-"*-x
I like it -- something new and not obvious.
More
It's really nice solution. It's short, it's readable, it's simple. Little PEP8 and docstring, and it will be perfect.
http://pep8online.com/share/519f30976cee16191749a28f
More
One little advice -- "sum" is a builtin function in python and using it as a variable name is not a good idea.
More
You forgot about spaces around operators (pep8).
if cell[0]==10 and cell[1]==10:
You can make it simpler
if cell == (10, 10):
line 4 -- "== 1" is not necessary
if lab[cell[0]][cell[1]]:
line 13-17
min(paths, key=len)
But for the shortest path you can use BFS
More
key = lambda x: x[1] * 1000 - ord(x[0])
Hm, it looks weird imho. What is it?
More
It's almost "clear" solution. Short and simple, but please don't use long lines -- it's hard for reading. :-) The new PEP8 allows 100 characters per line.
More
It does not look as "Clear" solution. The long lines, the bad names. I agree with [Cjkjvfnby's comment.](http://www.checkio.org/mission/humpty-dumpty/publications/pawlyk/python-27/first/#comment-outer-9032)
More