First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
answered 2017-08-09 23:12:21 -0600
It is a good practice to use the close() method to close a file. After the f.write line add:
f.close()