title: TypeError: translate() takes exactly one argument (2 given)
body: <p>My code is running fine on python 2.x versions but when I'm trying to run it on python 3.x version, it's giving error.</p>
  
  <p>subject: need to abbreviate any message in sms encoding.</p>
  
  <p>Code:</p>
  
  <pre><code>def sms_encoding(data):
      #start writing your code here
      print(data)
      data.split(" ")
      data_list=data.split(" ")
      sms_encd=[]
      final_sms=""
      for i in range(len(data_list)):
          if data_list[i].lower() in  ['a','e','i','o','u']:
              sms_encd.append(data_list[i])
          elif len(data_list[i])&gt;1:
              a = data_list[i].translate(None,'aeiouAEIOU')
              sms_encd.append(a)
      for j in range(len(sms_encd)):
          final_sms += str(sms_encd[j])+" "
      return final_sms[:-1]
  data="I will not repeat mistakes"
  print(sms_encoding(data)) 
  </code></pre>
  
  <p>Output:</p>
  
  <p>2.x versions:</p>
  
  <pre><code>I will not repeat mistakes
  I wll nt rpt mstks
  </code></pre>
  
  <p>3.x versions:</p>
  
  <pre><code>I will not repeat mistakes
  Traceback (most recent call last):
    File "python", line 18, in &lt;module&gt;
    File "python", line 12, in sms_encoding
  TypeError: translate() takes exactly one argument (2 given)
  </code></pre>
  
  <p>why <code>translate()</code> is not working? is there any alternative workaround?</p>