I have few list value which are shown as below and want to print the same to a text file in python.
But I couldn't able to write to a file.
Could anyone please help me how to print the list with tuples to a file .
My code:
======
fout=open('output.txt','w')
mylist = [('-1', 'limit-minimum 0 maximum 16', '')]
fout.write([tuple(line)])
expected output in output.txt
===================
[('-1', 'limit-minimum 0 maximum 16', '')]