aboutsummaryrefslogtreecommitdiff
path: root/sort.py
diff options
context:
space:
mode:
authorHolden Rohrer <hdawg7797@yahoo.com>2019-08-02 12:05:18 -0400
committerHolden Rohrer <hdawg7797@yahoo.com>2019-08-02 12:05:18 -0400
commitb0a60771b013569c62a59157b34b95a7c9a4c141 (patch)
treef96c276524711845032f2e4d93919b3c41fceafb /sort.py
parent1cfdee94df250223e3cffaa0079498e528f296c3 (diff)
parent6253f5563c1688c8cd6cb09a6669796e983bc869 (diff)
combined .gitignores
Diffstat (limited to 'sort.py')
-rw-r--r--sort.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sort.py b/sort.py
index 00007bc..1a38450 100644
--- a/sort.py
+++ b/sort.py
@@ -2,7 +2,7 @@
#Inputs file sort.tex, to sort as read, takes all data, and then reopens as write
f = open('sort.tex','r')
-dat = f.readlines()
+dat = f.readline().split('\\par ')
f.close()
f = open('sort.tex','w')
@@ -24,4 +24,4 @@ for lineind in range(len(dat)):
dat[lineind] = firstgroup(line)
dat.sort(key=lambda text : [ord(char) for char in text[0]])
-f.write(''.join([line[1] for line in dat]))
+f.write('\\par'.join([line[1] for line in dat]))