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