title: For loop iteration does not have desired affect
body: <p>I have the below code which scrapes a website, and writes the results to a csv file. The problem is that the for loop for some reason prints multiple copies of each iteration where it should only write each iteration once. Can someone please assist and point out what it is that I am missing here?
  Thank you</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import csv
  
  url = 'https://online.computicket.com'
  home_page = requests.get(url)
  
  home_page.content
  
  soup = BeautifulSoup(home_page.content, 'lxml')
  
  
  links = soup.find_all('a', {'class':'info'})
  
  next_link = []
  
  for link in links:
      next_link.append(link.get("href"))
  
  
  for i in range(0, len(next_link),1):    
      next_link.append(i)
      print(url + next_link[i])
      new_url = requests.get(url + next_link[i])   
  
      for link in (url + next_link[i]):
          new_url.content
          soup = BeautifulSoup(new_url.content, 'lxml')
  
          info_name = soup.find('div', {'class' : 'es-cost'}) 
          heading = soup.find('h1',{'class' : 'full'})
  
          with open('Don.csv', 'a') as csv_file:
  
              #csv_file.write(heading.get_text())
              for name in soup.find_all('div', {'class' : 'es-cost'}):
                  csv_file.write(heading.get_text())
                  csv_file.write(name.get_text())
  
                  print(name.get_text())
  </code></pre>