title: replace substrings in list
body: <p>I am looking forward to get rid of a space that is after each element in my list: </p>
  
  <pre><code>  list1 = ['Aena', 'Cellnex Telecom', 'Amadeus', 'Abertis']
  </code></pre>
  
  <p>in order to obtain the list like this: </p>
  
  <pre><code>  list1 = ['Aena','Cellnex Telecom','Amadeus','Abertis']
  </code></pre>
  
  <p>I have tried the following loop but returns the same initial list: </p>
  
  <pre><code>new_list = [stocks.replace(" ","") for stocks in list1]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>new_list = [stocks.replace(", '",",'") for stocks in list1]
  
  print(new_list)
  </code></pre>
  
  <p>Could anyone help me to obtain the desired list without the spaces?</p>