title: in python, using in, get specific elements
body: <p>I want to do something like this, but in python :</p>
  
  <p>select * from [list] where [element at index n] = 'hello'</p>
  
  <p>So far, I have this</p>
  
  <pre><code>    cells = [' ','hello',' ',' ',' ',' ',' ',' ',' ']
      emptySpots = []
  
      for s in range(len(cells)):
          if cells[s] == 'hello':
              emptySpots.append(s)
  </code></pre>
  
  <p>This gives me a list of the indexes of the cells with 'hello' in them, but I bet theres a more straightforeward (pythonesque) way to do this.</p>
  
  <p>What would be nice is a one liner that just returns the count of the number of elements in cells that equal ' '.</p>