Currently i have a list of list containing:
lst = [[1,2],[5,4],[10,9]]
and I'm trying to write the output in the form of a text file where it is formatted
1 2
5 4
10 9
I tried:
newfile = open("output_file.txt","w")
for i in range(len(lst)):
newfile.write(i)
newfile.close()
but I'm getting the error:
TypeError: write() argument must be str, not list
would appreciate some help on this.