I have a list in Python that looks like this:
myList = [(1,1),(2,2),(3,3),(4,5)]
And I want to subtract each element along with the others, for example:
(1,1) - (2,2) (1,1) - (3,3) (1,1) - (4,5) (2,2) - (3,3) (2,2) - (4,5) (3,3) - (4,5)
The expected result will be a list with the answers:
[(1,1), (2,2), (3,4), (1,1), (2,3), (1,2)]
How can i do this? If I approach it with a for loop, I can probably save the previous item and check it for the one I'm working with at the moment, but it actually doesn't work.