Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- companies = {}
- while True:
- data = input().split(" -> ")
- if "End" in data:
- break
- company, id = data
- if company not in companies:
- companies[company] = []
- if id not in companies[company]:
- companies[company].append(id)
- for k, v in sorted(companies.items()):
- print(f"{k}\n"+'\n'.join(["-- "+s for s in v]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement