From de9e7ac398ac4d7ea59422bdd9d9a22183f65a71 Mon Sep 17 00:00:00 2001 From: internetlandlord Date: Thu, 3 Nov 2022 21:44:48 +0000 Subject: Added appended identifiers to selection sort scripts --- reverse-selection-sort.py | 3 ++- selection-sort.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/reverse-selection-sort.py b/reverse-selection-sort.py index a085366..618be15 100755 --- a/reverse-selection-sort.py +++ b/reverse-selection-sort.py @@ -28,6 +28,7 @@ for i in range(len(numdata)): # updating values using simultaneous assignments numdata[i], numdata[mindex] = numdata[mindex], numdata[i] -# finishing up +# finishing up, appending identifier to file +target = target[:-4]+"-reverse-selection"+target[-4:] print("Sort complete, writing to file!") io.egressCSV(numdata,target) diff --git a/selection-sort.py b/selection-sort.py index b500333..f4e68ae 100755 --- a/selection-sort.py +++ b/selection-sort.py @@ -28,6 +28,7 @@ for i in range(len(numdata)): # updating values using simultaneous assignments numdata[i], numdata[mindex] = numdata[mindex], numdata[i] -# finishing up -print("Sort complete, writing to file!") +# finishing up, appending identifier to file +target = target[:-4]+"-selection"+target[-4:] +print("Sorting complete, writing to file!") io.egressCSV(numdata,target) -- cgit v1.2.3