title: Hexadecimal byte zero isn't zero
body: <p>As a trivial demonstration of what I mean, <code>subprocess.communicate()</code>'s <code>stdout</code> is always a <code>bytes</code> string.</p>
  
  <p>But:</p>
  
  <pre><code>&gt;&gt;&gt; assert stdout == bytes('{}'.format(stdin), "utf-8"), \
          "{} != {}".format(stdout, stdin)
  AssertionError: b'\x00' != b'0'
  </code></pre>
  
  <p>Moreover, if I follow <a href="https://stackoverflow.com/questions/606191/convert-bytes-to-a-python-string">Convert bytes to a Python string</a>, </p>
  
  <pre><code>&gt;&gt;&gt; assert \
      stdout.decode("utf-8") == \
      bytes('{}'.format(stdin), "utf-8").decode("utf-8"), \
      "{} != {}".format(stdout, stdin)
  AssertionError: b'\x00' != b'0'
  </code></pre>
  
  <p>It's trying to convert and compare byte strings, but I can't figure out how to either</p>
  
  <ol>
  <li><p>turn them into proper bytes</p></li>
  <li><p>make the strings look the same</p></li>
  </ol>
  
  <p>In this case, I happen to have the flexibility to read the <code>ord</code> of the singular char and compare <code>int:0</code> with <code>int:0</code>. What else can solve this?</p>