Return to Snippet

Revision: 8506
at September 26, 2008 06:58 by kyokutyo


Initial Code
#!/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()

Initial URL


Initial Description
This script is used for the sorted text.

Initial Title
delete overlapping line

Initial Tags
line

Initial Language
Python