AlexG2230954

Untitled

Jun 5th, 2022 (edited)
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. lol = set()
  2. kek = set()
  3.  
  4. def read_companies(file):
  5.     with open(file) as f:
  6.         data = f.read()
  7.     return data.strip().split()
  8.  
  9. files = ["ilon.txt", "bill.txt", "sasha.txt"]
  10.  
  11. for file in files:
  12.     for company in read_companies(file):
  13.         if company not in lol:
  14.             lol.append(company)
  15.         elif company not in kek:
  16.             kek.append(company)
  17.  
  18. print(len(kek))
Add Comment
Please, Sign In to add comment