title: Python split string with delimiter
body: <p>I'm trying to put it inside an array but without keeping the comments that begin with # and without the first &quot;-&quot;.</p>
  <pre><code>      - https://site1                                                             # site1
        - https://site2                                                     # site2
        - https://site3                                                           # site3
        - https://site4                                             # ssite4
  </code></pre>
  <p>I don't know if I have to remove the end of each line before or after having put it inside the array.
  If I put in inside an array with removing spaces etc, I have something like that:</p>
  <pre><code>['-https://site1#site1', '-https://site2#site2', '-https://site3#site3', '-https://site4#site4']
  </code></pre>
  <p>And I would like to only keep the websites.
  Expected result:</p>
  <pre><code>['https://site1', 'https://site2', 'https://site3', 'https://site4']
  </code></pre>