title: How do I use dnspython to query for a host pattern
body: <p>Let us say that I want to count the number of hosts that match a simple pattern.  For example:</p>
  
  <p>host1.example.com
  host2.example.com
  ...
  host42.example.com</p>
  
  <p>where I don't know ahead of time that there are 42 of these.  What I would like to do is something like:</p>
  
  <pre><code>answers = dns.resolver.query('host*.example.com', 'A')
  </code></pre>
  
  <p>and then be able to get the length of answers for the count or iterate over answers for the actual hostnames.</p>
  
  <p>Thanks,</p>
  
  <p>Glenn</p>