aneliabogeva

Key-Key Value-Value

Jul 2nd, 2019
116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. key_to_be_found = input()
  2. value_to_be_found = input()
  3. n = int(input())
  4.  
  5. data_dict = {}
  6.  
  7. for num in range(0, n):
  8. data_list = input().split(' => ')
  9. key = data_list[0]
  10. value = data_list[1].split(';')
  11.  
  12. data_dict[key] = value
  13.  
  14. for key, value in data_dict.items():
  15. if key_to_be_found in key:
  16. print(f"{key}:")
  17. for el in value:
  18. if value_to_be_found in el:
  19. print(f"-{el}")
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×