title: Extracting URLs from a text file
body: <p>How do I extract links which I have saved in a text file one by one to use it in my other code:-</p>
  
  <p>Example of a link in a text file is:- </p>
  
  <pre><code>http://www.barneys.com/givenchy-poplin-field-shirt-504068255.html
  </code></pre>
  
  <p>I have got only URLs in my text file and no multiple URLs in a single line.</p>
  
  <p>And my other code in which I have to use the link(s) is:-</p>
  
  <pre><code>import requests, re
  from bs4 import BeautifulSoup
  url=" " #here I have to use the links one by one
  r=requests.get(url)
  </code></pre>