title: What are the pythonic way to replace a specific set element?
body: <p>I have a python set set([1, 2, 3]) and always want to replace the third element of the set with another value.</p>
  
  <p>It can be done like below:</p>
  
  <pre><code>def change_last_elemnent(data):
      result = []
      for i,j in enumerate(list(data)):
          if i == 2:
              j = 'C'
          result.append(j)
      return set(result)
  </code></pre>
  
  <p>But is there any other pythonic way to do that,more smartly and making it more readable?</p>
  
  <p>Thanks in advance.</p>