I have a dictionary like :

```
dict = {8.12: 4, 6.93: 2, 6.78: 2, 7.04: 2, 7.21: 2, 8.05: 4, 7.48: 2, 
        6.52: 0, 6.95: 2, 7.28: 2, 7.56: 2, 6.67: 0, 6.33: 2, 6.37: 1, 
        7.15: 1, 8.16: 5, 7.84: 3, 7.13: 2, 6.24: 0, 7.11: 3}

```

I want to get all the values by key that is in range +- 1. For example, how can I get all that values that the key value is between 7 and 9.

```
x = 8
print dict[range(x-1,x+1)]

```