title: How to convert string to bytes in Python 2
body: <p>I know this may sounds like a duplicate question, but that's because I don't know how to describe this question properly. </p>
  
  <p>For some reason I got a bunch of unicode string like this:</p>
  
  <pre><code>a = u'\xcb\xea'
  </code></pre>
  
  <p>As you can see, it's actually bytes representation of a Chinese character, encoding in <code>gbk</code></p>
  
  <pre><code>&gt;&gt;&gt; print(b'\xcb\xea'.decode('gbk'))
  岁
  </code></pre>
  
  <p><code>u'岁'</code> is what I need, but I don't know how to convert <code>u'\xcb\xea'</code> to <code>b'\xcb\xea'</code>.<br>
  Any suggestions?</p>