Range as dictionary key in Python
<p>So, I had an idea that I could use a range of numbers as a key for a single value in a dictionary.</p>

<p>I wrote the code bellow, but I cannot get it to work.  Is it even possible?</p>

<pre><code>    stealth_roll = randint(1, 20)
    # select from a dictionary of 4 responses using one of four ranges.
    ## not working.
    stealth_check = {
                    range(1, 6) : 'You are about as stealthy as thunderstorm.',
                    range(6, 11) : 'You tip-toe through the crowd of walkers, while loudly calling them names.',
                    range(11, 16) : 'You are quiet, and deliberate, but still you smell.',
                    range(16, 20) : 'You move like a ninja, but attracting a handful of walkers was inevitable.'
                    }

    print stealth_check[stealth_roll]
</code></pre>