Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- heroes = input().split(', ')
- info = {}
- while True:
- stuff = input()
- if stuff == 'End':
- break
- tokens = stuff.split('-')
- name = tokens[0]
- item = tokens[1]
- cost = int(tokens[2])
- if name not in info:
- info[name] = [[item], cost]
- elif item not in info[name][0]:
- info[name][0].append(item)
- info[name][1] += cost
- [print(f'{hero} -> Items: {len(info[hero][0])}, Cost: {info[hero][1]}') for hero in heroes]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement