Loading...
Loading...
Loading...
Given a list of numbers, print each different number with how many times it appears. List the numbers in the order they first appear, one per line as value count.
Example
Input
6 3 1 3 2 1 3
Output
3 3 1 2 2 1
3 appears first, then 1, then 2.
Try the problem first. Open one hint at a time.
Keep a list of the values you have already reported, so each value is printed once.
The list method count tells you how many times a value appears.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor