Advertisement
Guest User

Untitled

a guest
May 30th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def checkfile(x):
  2.  
  3.  
  4. L = []
  5. while True:
  6. x = raw_input('Please write the file you want to comapre : ')
  7. if x == 'Escape':
  8. break
  9. fin = open(x, 'r')
  10. fin = fin.readlines()
  11. L.append(fin)
  12. l_intersection = L[0]
  13. for l in L:
  14. l_intersection = set(l_intersection).intersection(l)
  15. print l_intersection
  16.  
  17. print checkfile('a')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement