SHARE
TWEET

Untitled

a guest Oct 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def main():
  2. print('введите число листков')
  3. m = int(input())
  4. mainlist = []
  5. kol = 0
  6. coolmen = set()
  7. for i in range(m):
  8.     list = []
  9.     mainlist.append(list)
  10. for i in range(m):
  11.     print('введите число фамилий и сами фамилии')
  12.     n = int(input())
  13.     for j in range(n):
  14.         str = input()
  15.         mainlist[i].append(str)
  16.  
  17. for i in range(m):
  18.     for j in range(m):
  19.         for k in range(m):
  20.             if mainlist[i][j] in mainlist[k]:
  21.                 kol += 1
  22.         if kol == m:
  23.             coolmen.add(mainlist[i][j])
  24.         kol = 0
  25. print(*coolmen)
  26. main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top