title: How to split tuple in python
body: <p>How do I split tuple from dictionary</p>
  
  <pre><code>dic = {('K30', 'K56'): 1}
  </code></pre>
  
  <p>to get this output in a text file:</p>
  
  <pre><code>K30    K56    1
  </code></pre>
  
  <p>what I tried is</p>
  
  <pre><code>for k,v in dic.items():
      a,b = k.split(',') 
      print &gt;&gt;f, a+'\t',b+'\t',v
  f.close()
  </code></pre>
  
  <p>but I got the error:</p>
  
  <pre><code>AttributeError: 'tuple' object has no attribute 'split'
  </code></pre>