set函数去重
# -*- coding:utf-8 -*- srcTxt=open('1.txt','r').readlines() noRepeat=open('2.txt','w') st=set(srcTxt) noRepeat.write(''.join(st))
set函数去重
# -*- coding:utf-8 -*- srcTxt=open('1.txt','r').readlines() noRepeat=open('2.txt','w') st=set(srcTxt) noRepeat.write(''.join(st))
转载于:https://www.cnblogs.com/taoyuanming/p/10869623.html