title: How to make one function that takes two different values ​and generates a key in Python?
body: <p>For example you have two mail accounts,I want give these two e-mail accounts to a function and receive a unique key word for these two emails.But there is a problem, when I change mail locations I have to get the same result again.</p>
  <pre><code>def two_mails(test@gmail.com, test2@gmail.com):
      #algorithm codes
      return &quot;one_key&quot;
  </code></pre>
  <p>Another time I have to use this function and generate this key.</p>
  <pre><code>if two_mails(test@gmail.com, test2@gmail.com) == &quot;one_key&quot;:
      #Other codes
  </code></pre>
  <p>Even if I change email locations, I need to get the same key</p>
  <pre><code>if two_mails(test2@gmail.com, test@gmail.com) == &quot;one_key&quot;:
      #Other codes
  </code></pre>
  <p>They should be able to create different keys with different mails.</p>
  <pre><code>def two_mails(different@gmail.com, different2@gmail.com):
      #algorithm codes
      return &quot;different_key&quot;
  </code></pre>
  <p>Please write the sample code while writing your idea.</p>
  <p>EDITED#</p>
  <p>I need to generate a key for these two mails and use it as id in db. I need to be able to do db query with this key when I need it. <code>two_mails(different@gmail.com, different2@gmail.com)</code>.but sometimes mails change location <code>two_mails(different2@gmail.com, different@gmail.com)</code>. What I need is to get the same result even if the mail locations change</p>