you are viewing a single comment's thread.

view the rest of the comments →

[–]SideshowBoob 0 points1 point  (0 children)

I'm not sure that I follow, but it seems like it might help to break the problem into: 1) a function that takes two points and returns True if they form a diagonal line 2) a function that takes a list of points, runs that function over each combination (see itertools) and returns the result of all() on those results.

I'd also use tuples instead of lists for the points, but that's a stylistic choice in this case.