title: NameError: name 'buffer' is not defined
body: <p>Python2 code:</p>
  <pre><code>x = buffer(chr(0) * 32)
  </code></pre>
  <p>What is the python3 equivalent?
  I tried to replace buffer with <code>memoryview()</code> but than name error becomes a type error: TypeError: memoryview: a bytes-like object is required, not 'str'.</p>
  <p>I'm pretty sure that this should be a string and not a byte.</p>
  <p>Can someone help me?</p>
  <p><a href="https://stackoverflow.com/questions/50160187/buffer-function-for-python-3">Buffer function for python 3+</a> <strong>IS NOT THE ANSWER!</strong></p>