title: How to remove a part of a url in python?
body: <p>I have a list of urls which have varying numbers in the end after an <code>&amp;</code> sign. I'm not able to apply a regex to remove these numbers (including the <code>&amp;</code>) from the url as there are multiple &amp; in the string and the <code>re.sub('&amp;\d*',"",x)</code> command filters all of the <code>&amp;</code>  including the one I want to remove.</p>
  
  <p>The url is: <code>http://helloworld.com?p1=123&amp;p2=987&amp;hello=world&amp;123456</code></p>
  
  <p>The desired output I want is: <code>http://helloworld.com?p1=123&amp;p2=987&amp;hello=world</code>  </p>