I try to do the following,
file = open('test.txt', 'w+')
item = "hello"
file.write(item)
print(file)
When I run this program I get the following output,
<_io.TextIOWrapper name='test.txt' mode='w+' encoding='cp1252'>
Is there a way to open and then write in the file and then save it so I can use that new file somewhere else? Even though I have something written in the file, I still get this output.