title: Converting Python 3 String of Bytes of Unicode - `str(utf8_encoded_str)` back to unicode
body: <p>Well, let me introduce the problem first.</p>
  
  <p>I've got some data via POST/GET requests. The data were UTF-8 encoded string. Little did I know that, and converted it just by <code>str()</code> method. And now I have full database of "nonsense data" and couldn't find a way back.</p>
  
  <h1>Example code:</h1>
  
  <p><strong>unicode_str</strong> - this is the string I should obtain</p>
  
  <p><strong>encoded_str</strong> - this is the string I got with POST/GET requests - <strong>initial data</strong></p>
  
  <p><strong>bad_str</strong> - the data I have in the Database at the moment and I need to get unicode from.</p>
  
  <p>So apparently I know how to convert:
  <strong>unicode_str</strong> =(<code>encode</code>)=> <strong>encoded_str</strong> =(<code>str</code>)=> <strong>bad_str</strong></p>
  
  <p>But I couldn't come up with solution back:
  <strong>bad_str</strong> =(<code>???</code>)=> <strong>encoded_str</strong> =(<code>decode</code>)=> <strong>unicode_str</strong></p>
  
  <pre><code>In [1]: unicode_str = 'Příliš žluťoučký kůň úpěl ďábelské ódy'
  
  In [2]: unicode_str
  Out[2]: 'Příliš žluťoučký kůň úpěl ďábelské ódy'
  
  In [3]: encoded_str = unicode_str.encode("UTF-8")
  
  In [4]: encoded_str
  Out[4]: b'P\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88 \xc3\xbap\xc4\x9bl \xc4\x8f\xc3\xa1belsk\xc3\xa9 \xc3\xb3dy'
  
  In [5]: bad_str = str(encoded_str)
  
  In [6]: bad_str
  Out[6]: "b'P\\xc5\\x99\\xc3\\xadli\\xc5\\xa1 \\xc5\\xbelu\\xc5\\xa5ou\\xc4\\x8dk\\xc3\\xbd k\\xc5\\xaf\\xc5\\x88 \\xc3\\xbap\\xc4\\x9bl \\xc4\\x8f\\xc3\\xa1belsk\\xc3\\xa9 \\xc3\\xb3dy'"
  
  In [7]: new_encoded_str = some_magical_function_here(bad_str) ???
  </code></pre>