title: How to create a list() of partially sequenced alphanumeric items?
body: <p>I thought it rather simple but can't figure out by myself. I have a range of non-continuous items, like this:</p>
  
  <p><code>farm011 - farm018, farm020, farm022 - farm033, farm041 - farm052, ......</code></p>
  
  <p>which I want to put in a list(). What's the easiest way of doing that? Just to make it clear[er], I think the list should look like this: </p>
  
  <pre><code>myItem = ['farm011','farm012','farm013','farm014','farm020','farm022','farm023','farm024','farm25',....]
  </code></pre>
  
  <p>I'm sorry if it's already answered here and I didn't find it. Thanks in advance. cheers!! </p>
  
  <p><hr>
  <strong>Update 1:</strong> <em>Error message from eyquem code</em></p>
  
  <p>I copied &amp; pasted the code exactly as you wrote and this is what I get in error: </p>
  
  <pre><code>File "./test.py", line 11
      gen = ( ("%s%03d"%(w1,i) for i in range(int(s),int(e)+1)) if w2
                                 ^
  SyntaxError: invalid syntax
  </code></pre>