title: What's the best way to create exchangeable tuple keys for the same dictionary value?
body: <pre><code>def check():
      dict_choice_a = {(a, b) : value, (b, a) : value}  #(a, b) and (b, a) refer to the same value but repeted
      dict_choice_b = {tuple(sorted((a, b)) : value}  #not repetitive but unreadable
      dict_choice_a[(a, b)] = new_value #need to do twice to change value but more readable than dict_choice_b
      dict_choice_a[(b, a)] = new_value
  
      #value of both keys are always the same
  </code></pre>
  
  <p>I want to create a <code>dictionary</code> that has tuple keys referred to its values, that keys need to be exchangeable as <code>(a, b) = (b, a)</code> and they only refer to the same value.</p>
  
  <p>Here's the question is: what is the best way to make the element of tulpe of keys exchangeable but also refer to the same value.</p>
  
  <p>Moreover, string should be also work in the solution.</p>