45
Valentin Bryukhanov
http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 7 months, 16 days
Difficulty Normal
Developer, engineer and taskMaker.
Not universal, but funny :-) And I like "properties". Nice!
More
Change input data is not a good practice. You can use
work = sorted(data)
instead line 6-7
amount = len(data)
line 9 is overhead
if amount % 2: # the same as amount % 2 != 0
and line 13 is not needed.
More
Do you think A* is not overkill algorithm for this task? I don't sure about heuristic.
But +2 for implementation and +1 for good comments.
More
any([ch.isupper() for ch in data]) and
I prefer list comprehension. For memory problem, i can just to replace list comprehension to generator comprehension. If honestly, i don't like map and filter.
More
" == True" is redundant.
"range(0, len(list_of_words))" -- 0 is default, so you can use range(x) == range(0, x)
And you can iterate through list instead indexes:
for w1 in list_of_words:
for w2 in list_of_words:
More
Too many manual work and if you will decide to change for bigger square...
More
tab=recur(tab,value+1,x1-1,y1+2)
You can make it shorter and readable using a loop.
More
Of course. Thanks, i tried to solve it with linear equations and made a mistake. Now i see where is my mistake.
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