title: Remove Part of String Before the Last Forward Slash
body: <p>The program I am currently working on retrieves URLs from a website and puts them into a list. What I want to get is the last section of the URL.</p>
  
  <p>So, if the first element in my list of URLs is <code>"https://docs.python.org/3.4/tutorial/interpreter.html"</code> I would want to remove everything before <code>"interpreter.html"</code>. </p>
  
  <p>Is there a function, library, or regex I could use to make this happen? I've looked at other Stack Overflow posts but the solutions don't seem to work.</p>
  
  <p>These are two of my several attempts:</p>
  
  <pre><code>for link in link_list:
     file_names.append(link.replace('/[^/]*$',''))
  print(file_names)
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>for link in link_list:
     file_names.append(link.rpartition('//')[-1])
  print(file_names)
  </code></pre>