title: python 3: how to make strip() work for bytes
body: <p>I've contered a Python 2 code to Python 3.
  In doing so, I've changed </p>
  
  <pre><code>print 'String: ' + somestring
  </code></pre>
  
  <p>into</p>
  
  <pre><code>print(b'String: '+somestring)
  </code></pre>
  
  <p>because I was getting the following error:</p>
  
  <pre><code>Can't convert 'bytes' object to str implicitly
  </code></pre>
  
  <p>But then now I can't implement string attributes such as strip(), because they are no longer treated as strings... </p>
  
  <pre><code>global name 'strip' is not defined 
  </code></pre>
  
  <p>for</p>
  
  <pre><code>if strip(somestring)=="":    
  </code></pre>
  
  <p>How should I solve this dilemma between switching string to bytes and being able to use string attributes? Is there a workaround?
  Please help me out and thank you in advance..</p>