Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- some_words = input().split(" | ")
- words = {}
- for i in some_words:
- data = i.split(":")
- key = data[0]
- value = data[1].strip()
- if key not in words:
- words[key] = [value]
- else:
- words[key].append(value)
- test_words = input().split(" | ")
- command = input()
- if command == "Hand Over":
- for x in words:
- print(x, end=" ")
- elif command == "Test":
- for j in test_words:
- if j in words:
- print(f"{j}:")
- for k in words[j]:
- print(f" -{k}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement