I need to write
ranks[a], ranks[b], count
to a file, each time on a new line
I am using:
file = open("matrix.txt", "w")
for (a, b), count in counts.iteritems():
file.write(ranks[a], ranks[b], count)
file.close()
but this is not working and returns
TypeError: function takes exactly 1 argument (3 given)
As the error says,
file.writeonly takes one arg. Try: