pint/tools/csstosort.py

11 lines
287 B
Python
Raw Normal View History

2022-07-21 05:50:52 +00:00
with open('formatted.txt', 'a') as f:
x = open('colors.txt','r')
prev_line = ''
for current_line in x:
if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip():
f.write('\n')
f.write(current_line)
prev_line = current_line
x.close()