blob: 431a6f2607bd09c49e8af2ebe4eab5c02b4daef4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/python3
# ---------- title
# ---------- Imported modules
import inputoutput as io
import csv
import sys
# ---------- Main
target = sys.argv[1]
# ingress of data
numdata = io.ingressCSV(target)
# bubble sort operation
for i in range(len(numdata)):
for j in range(0,len(numdata)-i-1):
if numdata[j] > numdata[j+1]:
numdata[j], numdata[j+1] = numdata[j+1], numdata[j]
# finishing up
print("writing to file")
io.egressCSV(numdata,target)
|