title: A class for spin up and down particles?
body: <p>So I have a bunch of particles which can be of two kinds let's say &quot;up&quot; and &quot;down&quot;. I am new to python but I know that this segregation can be done with the help of a class.</p>
  <p>Let's say I have a list:</p>
  <pre><code>T=np.linspace(0,1,1000)
  </code></pre>
  <p>I want each element of this list to be either one of the two particles but I am not sure if I should create two classes with one &quot;kind&quot; each or a single class with two &quot;instances&quot; and assign each element an instance.</p>
  <p>In the end, what I want to do is randomly distribute this property of being &quot;up&quot; and &quot;down&quot; over the list T.</p>