I am trying to write a list into the file. I used:
studentFile = open("students1.txt", "w")
for ele in studentList:
studentFile.write(str(ele) + "\n")
studentFile.close()
As a result, the output was:
['11609036', 'MIT', 'NE']
['11611262', 'MIT', 'MD']
['11613498', 'BIS', 'SA']
instead of:
11609036 MIT NE
11611262 MIT MD
11613498 BIS SA
How can I fix it?