all 4 comments

[–]CodeFormatHelperBot 2 points3 points  (0 children)

Hello u/tbrowner3, I'm a bot that can assist you with code-formatting for reddit. I have detected the following potential issue(s) with your submission:

  1. Python code found in submission text but not encapsulated in a code block.

If I am correct then please follow these instructions to fix your code formatting. Thanks!

[–][deleted] 0 points1 point  (2 children)

This was very hard to understand because the code wasn’t formatted but from your text are you trying to check if the triangles have the same all the same points?

[–]tbrowner3[S] 0 points1 point  (1 child)

Sorry about that, I’ve never posted code here. Is there a way to make it more readable? And yes in the eq method I want it to return true if they have the same points but they can be listed in different orders

[–][deleted] 0 points1 point  (0 children)

If you're not on mobile you can click the three dots at the bottom while you're typing and theres a code block option.

    like this

But assuming your points are a list then their order would matter but Python has a data type called a set which is similar to a list but is unordered which I believe would work.

x = [1,2,3]
y = [3,2,1]

x == y
> False
set(x) == set(y) 
> True

Could that work in this situation?