标签:odi http admin https lin 文档 set dmi close
# -*- coding:utf-8 -*-
#! python2
import shutil
a=0
readDir = r"D:\pycharm-project\my-project\test\thefile2018-11-27.sh"
writeDir = r"D:\pycharm-project\my-project\test\new.txt"
# txtDir = "/home/Administrator/Desktop/1"
lines_seen = set()
outfile = open(writeDir, "w")
f = open(readDir, "r")
for line in f:
if line not in lines_seen:
a+= 1
outfile.write(line)
lines_seen.add(line)
print(a)
print(‘\n‘)
outfile.close()
print("success")
标签:odi http admin https lin 文档 set dmi close
原文地址:https://www.cnblogs.com/zhaobowen/p/13390058.html