title: List comparison failure with Vampire Numbers
body: <p>This code checks whether or not a combination of numbers produces a <a href="http://en.wikipedia.org/wiki/Vampire_number" rel="nofollow">vampire number</a> but returns an incorrect True if x = 2947051 and y = 8469153.</p>
  
  <pre><code>def vampire_test(x, y):
      vamp = (list(str(x) + str(y)))
      prod = x*y
      vamp_check = list(str(prod))
  
      print vamp, vamp_check
  
      if '-' in vamp and '-' not in vamp_check:
          return False
      else:
          check = cmp(vamp.sort(),vamp_check.sort())
          if check == 0 and len(vamp) == len(vamp_check):
              return True
          else:
              return False
  </code></pre>
  
  <p>What's the issue and how can I improve the code I've already written?</p>