title: How to set some value to zero in a specific interval
body: <p>Recently I have some problem about how to set some value to zero
  here is my code:</p>
  
  <pre><code>a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
  b=[]
  c=[]
  e=[]
  for st in range(0,10):
      b.append(a[st])
      if (b&gt;5) or (b&lt;3):
          c=b
      else:
          c=0
      e=c
  print e
  </code></pre>
  
  <p>I hope the result is to be <code>e=[1,2,0,0,0,6,7,8,9,10]</code>, but the result of <code>e</code> is always not what I want.I use another way I found on this website <code>b[ma.logical_or(b&lt;5,b&gt;3)]=0</code>,it still doesn't have any great result I want.Does anybody help me to solve the question?</p>