diff options
author | Holden Rohrer <hdawg7797@yahoo.com> | 2019-08-02 12:05:18 -0400 |
---|---|---|
committer | Holden Rohrer <hdawg7797@yahoo.com> | 2019-08-02 12:05:18 -0400 |
commit | b0a60771b013569c62a59157b34b95a7c9a4c141 (patch) | |
tree | f96c276524711845032f2e4d93919b3c41fceafb /sort.py | |
parent | 1cfdee94df250223e3cffaa0079498e528f296c3 (diff) | |
parent | 6253f5563c1688c8cd6cb09a6669796e983bc869 (diff) |
combined .gitignores
Diffstat (limited to 'sort.py')
-rw-r--r-- | sort.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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])) |