title: how to access set elements by index?
body: <p>I was working on recommendation system (RS) in python when I came across a serious problem: I couldn't access the set without changing its order.</p>
  
  <p>e.g. Once I changed a set to list the order gets change. (In recommendation, system order is very important.)</p>
  
  <p><code>final_prediction=set(df_final)-set(df1)</code></p>
  
  <p>e.g.</p>
  
  <pre><code>&gt;&gt;&gt; df_final=['a','x','z','p','s','j','b']
  &gt;&gt;&gt; df1=['b','j']
  &gt;&gt;&gt; set(df_final)-set(df1)
  {'p', 'a', 's', 'z', 'x'}
  </code></pre>
  
  <p>Here <code>df_final</code> and <code>df1</code> both are categorical variables</p>
  
  <p>Although I used other approach, I had to scratch my butt's to change the code because it was giving perfect results using set thing and all other things were just working fine. I was in the final phase of my RS, but because of the set order I had to take other approach.</p>
  
  <p>How do we access an set without changing the order?</p>