title: Remove newline characters from a list
body: <p>I have the below list</p>
  
  <pre><code>list = ['\n                                A\n                            ', '\n                                B\n                            ', '\n                                C\n                            ', '\n                                D\n                            ']
  </code></pre>
  
  <p>Seems like list is center aligned and this list is the output of bs4 code I run. How can I remove all the newline characters from this list that the final output looks like</p>
  
  <pre><code>list = ['A','B','C','D']
  </code></pre>