title: How to get data set using python or C++
body: <p>I have  a data look like:</p>
  <p><a href="https://i.stack.imgur.com/6dZe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6dZe4.png" alt="enter image description here" /></a></p>
  <p>So if I give the name for each row: a1 a2 b1 b2 c1 c2 d1 d2. The rule is: A B C D, you can swap position in each big row. I need to take set of 4 numbers, so I will have:</p>
  <ul>
  <li>a1 b1 c1 d1</li>
  <li>a2 b1 c1 d1</li>
  <li>a1 b2 c2 d2</li>
  <li>a2 b2 c2 d2</li>
  <li>a1 b1 c2 d2</li>
  <li>a2 b1 c2 d2</li>
  <li>a1 b1 c1 d2</li>
  <li>a2 b1 c1 d2</li>
  <li>a1 b2 c1 d2</li>
  <li>a2 b2 c1 d2</li>
  <li>a1 b1 c1 d2</li>
  <li>a2 b1 c1 d2</li>
  <li>a1 b1 c2 d1</li>
  <li>a2 b1 c2 d1</li>
  <li>a1 b2 c2 d1</li>
  <li>a2 b2 c2 d1</li>
  </ul>
  <p>So when I changed the number I will have many set of data.
  How can I filter to take unique of data set. And count how many times It appear for each unique set.</p>