/ Published in: Python

This script is used for the sorted text.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/env python # -*- coding: utf-8 -*- filein = "./inputdata.txt" fileout = "./outputdata.txt" r = open(filein,'r') w = open(fileout,'w') tmp = "" for line in r: if (tmp != line): w.write(line) tmp = line r.close() w.close()
Comments
