Python: Append tuple to a set with tuples
<p>Following is my code which is a set of tuples: </p>

<pre><code>data = {('A',20160129,36.44),('A',20160201,37.37),('A',20160104,41.06)};
print(data);
</code></pre>

<p>Output: <code>set([('A', 20160129, 36.44), ('A', 20160104, 41.06), ('A', 20160201, 37.37)])</code></p>

<p>How do I append another tuple <code>('A', 20160000, 22)</code> to <code>data</code>?</p>

<p>Expected output: <code>set([('A', 20160129, 36.44), ('A', 20160104, 41.06), ('A', 20160201, 37.37), ('A', 20160000, 22)])</code></p>

<p>Note: I found a lot of resources to append data to a set but unfortunately none of them have the input data in the above format. I tried <code>append</code>, <code>|</code> &amp; <code>set</code> functions as well. </p>

<p>the trick is to send it inside brackets so it doesn't get exploded</p>

<pre><code>data.update([('A', 20160000, 22)])
</code></pre>

python set