I have data as following [0.1,0.2,1,5,100] and so on...
What i want to do is count number of items between

```
1-10
11-20
21-30
... and so on...

```

Right now, I have a very messy code..

What I have done is mapped 

```
1-10 :=> 0
11-20:=> 1
..and on..

```

So I have defined buckets where bucket 0 has range 1-10, bucket 1 has range 11-20 and so on.

And the code is:

```
for ele in data:
    bucket_id = get_bucket_id(ele)
    freq_dict[bucket_id] +=1

```

`get_bucket_id` is a big `if else` code..

Is there a better way to do this?