title: How to check if a specific digit is in an integer
body: <p>I want to check if, for example, the digit '2' is in 4059304593.
  My aim is to then check if there are any of the digits 1-9 not in my integer. This is what I have tried:</p>
  <pre><code>for i in xrange(10):
      for j in xrange(100):
          num = str(i^j)
          one_count = 0
          two_count = 0
          for k in xrange(len(num)):
              if num[k] == 1:
                  one_count += 1
              if num[k] == 2:
                  two_count += 1                    
  </code></pre>
  <p>Then my &quot;counts&quot; would go all the way down to nine_count, and if any of the counts are 0, then that digit isn't in 'num'. From what I've read on these sites, my script would be inefficient - can someone point out a better way?</p>