title: For Loop with txt file
body: <p>I want to perform a set of actions for each website I have saved in the txt file "webpages.txt" I am not the most familiar with python, but in powershell I would normally use a "foreach variable in txt do this" kind of script. How would this be achieved through python?</p>
  
  <p>This is what I have tried so far:</p>
  
  <pre><code>with open ("C:\Users\Desktop\Notes\Scripts\Download_PDF\webpages.txt") as sheet:
      for websites in sheet:
          browser.visit('websites')
          browser.find_by_xpath('//*[@id="navigation"]/ul/li[4]').click()
          browser.find_by_id('action-export-pdf-link').click()
  </code></pre>
  
  <p>Python reads 'websites' not as a string, not a variable. Any and all help is appreciated!</p>