45
Valentin Bryukhanov
http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 7 months, 15 days
Difficulty Normal
Developer, engineer and taskMaker.
This is original and interesting solution, but is not "Clear" for newbies.
I would give you thumbsUp if it was in a different category.
More
Interesting. But for the "clear" category you can add some comments (for newbies).
More
We need to do something with code highlighter -- it's hard to read oneliners with scrolling (for chrome in mac)
Great solution!
More
Ha. Nice! I just saw it. The interesting idea to break all links (instead rings) and look for the best of them. Brilliant!
More
count += w2 > 4
Nice, if honestly, i didn't get it at first. It's not obvious type conversation, but interesting.
More
Why?
result_v = check_vertical(matrix)
if result_v:
return True
It can be shorter and simpler:
if check_vertical(matrix):
return True
Or you can simplify the whole function:
return check_vertical(matrix) or check_horizontal or check_diagonal
More
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
Thanks. This is the original solution and interesting method with rotations. It's something new.
More
I can not see the author of this solution, because I use Random Review. But it looks like mine -- the same mistake with "except".
More
One little advice -- "sum" is a builtin function in python and using it as a variable name is not a good idea.
More
I didn't get why do you use "*a" here. A input tuple become
a == ((data),)
and then you unwrap it again.
list conversion are redundant -- "sorted" can work with tuples too.
And
"lambda x: abs(x)" is the same as "abs". So you can use "key=abs".
P.S. PEP8 is a good choice for "Clear" ca
More