title: filter items in a python dictionary where keys contain a specific string
body: <p>I'm a C coder developing something in python. I know how to do the following in C (and hence in C-like logic applied to python), but I'm wondering what the 'Python' way of doing it is.</p>
  
  <p>I have a dictionary d, and I'd like to operate on a subset of the items, only those who's key (string) contains a specific substring.</p>
  
  <p>i.e. the C logic would be:</p>
  
  <pre><code>for key in d:
      if filter_string in key:
          # do something
      else
          # do nothing, continue
  </code></pre>
  
  <p>I'm imagining the python version would be something like</p>
  
  <pre><code>filtered_dict = crazy_python_syntax(d, substring)
  for key,value in filtered_dict.iteritems():
      # do something
  </code></pre>
  
  <p>I've found a lot of posts on here regarding filtering dictionaries, but couldn't find one which involved exactly this.</p>
  
  <p>My dictionary is not nested and i'm using python 2.7</p>