Sample Output

```

Enter numbers separated by spaces :1 2 3 3 2 2 2 1 3 4 5 3

{'1': 2, '3': 4, '2': 4, '5': 1, '4': 1}

1 occurs 2 times

3 occurs 4 times

2 occurs 4 times

5 occurs one time

4 occurs one time

```

So I'm a total newbie at python but I was thinking of starting off like this :

```
d = {}     
user = input("Enter numbers separated by spaces :") 
data = user.split() 

```

Except every loop i tried kept saying that I cant convert str() to int(), I'd appreciate any help, I've been staring at this problem for a few hours..this is something I tried for when input is string, trying to implement something similar for dictionary

```
def countdigits (aString):  
  c = 10 * [0]

  for e in aString: 
    c[int(e)] += 1 

  return c 

def main (): 
  n = 0 

  for v in (countdigits(str(input('Enter a string: ')))): 
    if v == 1: 
      print(n, "occurs 1 time")
    elif v!=0:
      print(n, "occurs", v, "times")

    n += 1 

main()

```

I'd like a similar solution to this, for the ouput given (but using dictionaries)