Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- colors = {}
- for each_time in range((int(input()))):
- command = [item for item in input().split(" -> ")]
- values = [item for item in command[1].split(",")]
- for value in values:
- if command[0] not in colors:
- colors[command[0]] = {}
- colors[command[0]][value] = 1
- elif command[0] in colors:
- if value not in colors[command[0]]:
- colors[command[0]][value] = 1
- elif value in colors[command[0]]:
- colors[command[0]][value] += 1
- command_check = [item for item in input().split(" ")]
- for color, item in colors.items():
- print(f"{color} clothes:")
- for values, count in item.items():
- if command_check[0] == color and command_check[1] == values:
- print(f"* {values} - {count} (found!)")
- else:
- print(f"* {values} - {count}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement