title: How to divide a given time interval into equal intervals?
body: <p>Given an interval of time:</p>
  
  <pre><code>a = [20,40]
  </code></pre>
  
  <p>I need to covert it into an equal intervals of:</p>
  
  <pre><code>a = [[20,30],[30,40]]
  </code></pre>
  
  <p>I tried this code:</p>
  
  <pre><code>v1 = a[0]; v2 = a[1]
  d.append(v1)
  val = abs(v1-v2)
  n = int(val/2)
  for i in range(n):
       v1 += n
       d.append(v1)
  print d
  </code></pre>
  
  <p>Can anyone suggest a code to do this it will be helpfull</p>