title: How to find all those triplets points which are present at equidistant from each other in python
body: <p>i am solving a basic python problem,my task is to find all those triplets points which are at equidistant from each other.
  for example</p>
  <pre><code>points=[1,2,4,6,7,8]
  res=[(1,4,7),(2,4,6),(4,6,8),(6,7,8)]
  </code></pre>
  <p>explanation:</p>
  <pre><code>(1,4,7)-&gt;  4-1 is equals to 7-4
  (2,4,6)-&gt;  4-2 is equals to 6-4
  </code></pre>
  <p>and so on..</p>