title: Python comparing strings to their equivalent integers effeciently
body: <p>What's the most efficient way to compare two python values both of which are probably strings, but might be integers.  So far I'm using str(x)==str(y) but that feels inefficient and (more importantly) ugly:</p>
  
  <pre><code>&gt;&gt;&gt; a = 1.0
  &gt;&gt;&gt; b = 1
  &gt;&gt;&gt; c = '1'
  &gt;&gt;&gt; a == b
  True
  &gt;&gt;&gt; b == c
  False  # here I wanted this to be true
  &gt;&gt;&gt; str(b)==str(c)
  True   # true, as desired
  </code></pre>
  
  <p>My actual objects are dictionary values retrieved with get(), and most of them are strings.</p>