Advertisement
Redomine

словарь

Jul 14th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import copy
  2.  
  3. dictionary_number=int(input())
  4. dictionary=[input().lower() for x in range(dictionary_number)]
  5.  
  6. text_number=int(input())
  7. text=[]
  8. for x in range(text_number):
  9. text+=input().split()
  10.  
  11. input_data=copy.deepcopy(text)
  12.  
  13. result_output=[]
  14. for x in range (len(text)):
  15. text[x]=text[x].lower()
  16. if text[x] in dictionary:
  17. continue
  18. else:
  19. if input_data[x] in result_output: continue
  20. else: result_output.append(input_data[x])
  21. for word in result_output:
  22. print (word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement