title: python2 vs python3 translate method
body: <p>I tried to convert below python2 code to python3 but my ideas won't work. Any suggestions please?</p>
  
  <pre><code>    with open("somefile.b64") as f:
  encryptedt = f.read().translate(None, '\n')
  </code></pre>
  
  <p>python3 code</p>
  
  <pre><code>with open("somefile.b64") as f:
          eStr = f.read()
          trantab = eStr.maketrans('', '\n') #Tried None as first argument
          encryptedt = eStr.translate(trantab)
  </code></pre>
  
  <p>With None as first argument, I received an error that the first argument must be a string and with empty string I received the first two maketrans arguments must have equal length</p>