title: generating 10 values in python around one value
body: <p>I am trying do write a quick simulation program. As a first step, I want to take an input and do the following:</p>
  
  <ol>
  <li>Use this input to find the corresponding value from the dict, say I
  got <code>29.0</code> in my example.</li>
  <li>I would now like to generate 3 values to the left and 3 values to the right. Ideally the output should be <code>27.5, 28.0, 28.5, 29.0, 29.5, 30, 30.5</code></li>
  </ol>
  
  <p>Here is my program -- which is partially solving my problem.</p>
  
  <pre><code>#!/usr/bin/python
  def getids(tk):
      tk=tk.lower()
          r=map(lambda x:x/10.0,range(0,6))   
      val={'PPP':29}
      val={k.lower():v for k,v in val.items()}
      if tk in val:
          stk_price=val[tk]   
      for i in r:
          stk_price=stk_price + i
          print(stk_price)
  getids('PPP')
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>29.0
  29.1
  29.3
  29.6
  30.0
  30.5
  </code></pre>
  
  <p>Is it possible to use numpy and generate values around a number ? Appreciate any help. </p>