title: How to search range with intervals in Python
body: <p>I've been given a project and although I've managed to get it to work, part of it looks very messy and I can't think of what I'm sure is a simple fix to it. My knowledge of programming is minimal so most Google searches for it have confused me and I don't really know how to define what I want. Anyone here is the code:</p>
  
  <pre><code>(if x in range(25,76) or x in range(125,176) or x in range(225,276) or
      x in range(325,376) or x in range(425,476) or x in range(525,576) or
      x in range(625,676) or x in range(725,776)):
  </code></pre>
  
  <p>I think you can see what I'm trying to do but I've had to list it as separate ranges each time, help will be much appreciated!</p>