From 030d136e851340af56c613bca75a4c58d91e8c4a Mon Sep 17 00:00:00 2001 From: internetlandlord Date: Wed, 26 Oct 2022 09:55:31 -0500 Subject: Refactoring/housekeeping on source code for bubble, io and insertion sort files. --- inputoutput.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inputoutput.py') diff --git a/inputoutput.py b/inputoutput.py index 0f0b94a..dd20da6 100755 --- a/inputoutput.py +++ b/inputoutput.py @@ -1,7 +1,9 @@ #!/bin/python3 # ---------- inputoutput.py -# Contains functions used for creating and intaking data +# Contains functions used for the creating, importing and exporting +# series of randomly-generated integers to a CSV file. This is used +# as a module in the algo-py scripts to simply and expedite coding. # ---------- Imported Modules import csv @@ -31,10 +33,11 @@ def egressCSV(row,location): # create a new file with -sorted location = location[:-4]+"-sorted"+location[-4:] - + # open file to write f = open(location,'w') writehead = csv.writer(f) + # write the row to file and close writehead.writerow(row) f.close() -- cgit v1.2.3