Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def povt(x):
- s = []
- for i in x:
- ii = i.lower()
- if ii in s:
- return False
- if ii not in s:
- s.append(ii)
- return True
- f1 = open('spies.txt', 'r')
- f2 = open('suspicions.txt', 'w')
- for i in f1:
- for ii in i.split():
- if povt(ii):
- f2.write(ii + ' ')
- f2.write('\n')
- f1.close()
- f2.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement