Do you know any python?
Is this an assignment?
You will need to open a file for output,example:
in either case, you will write output data to the file wherever you want using something similar to:
Is this an assignment?
You will need to open a file for output,example:
with open('myfile.suffix', 'w') as fp:then indent all code so it's part of the file loop, or just open and then close at end.
in either case, you will write output data to the file wherever you want using something similar to:
fp.write(somedata)