title: What is the difference between encode/decode in Python 2/3
body: <p>In Python 3, we use <code>"string".encode()</code> and <code>"string".decode()</code> to convert an Unicode string to a bytes string, or convert a bytes string to an Unicode string.</p>
  
  <p>In Python 2, we have <code>str()</code> and <code>unicode()</code>, we can <code>encode()</code> and <code>decode()</code> to them, too. But, is there any difference between Python 3?</p>