title: Does turning a list into a set, then back again, cause problems in Python?
body: <p>I'm turning a list into a set in Python, like so:</p>
  
  <pre><code>request.session['vote_set'] = set(request.session['vote_set'])
  </code></pre>
  
  <p>So I can easily do a <code>if x in set</code> lookup and eliminate duplicates. Then, when I'm done, I reconvert it:</p>
  
  <pre><code>request.session['vote_set'] = list(request.session['vote_set'])
  </code></pre>
  
  <p>Is there a better way to do this? Am I potentially doing something dangerous (or stupid)?</p>