Alright I have created a web scraper. I am quite new to python so if you have any other advice for me that would be awesome.

Basically my question is, how do I iterate through each of the dictionary items. Basically the url = (common url) + (value in dictionary). I want to go through each value in dictionary and then output it to csv. 

Just a note: If nothing has been posted by the company today then there will be no output to CSV For Sept 12(today) the only company that should output anything is "Ackroo": "00018766".

Thanks

```
from bs4 import BeautifulSoup
import urllib2
import time
import csv

links_list = []
other_list = []
time = time.strftime("%b %d %Y")

company_dict = {
    "Baytex Energy": "00031017",
    "Crescent Point Energy": "00028658",
    "Legacy Oil + Gas": "00023400",
    "Leucrotta Exploration": "00036173",
    "Lightstream Resources": "00028969",
    "Pengrowth Energy": "00031000",
    "Surge Energy": "00010447",
    "Ackroo": "00018766"
}

url = 'http://www.sedar.com/DisplayCompanyDocuments.do?lang=EN&issuerNo=%s' % (company_dict['Ackroo'])
sedar = urllib2.urlopen(url)
read_sedar = sedar.read()
soup = BeautifulSoup(read_sedar)

def print_list():
    tds = soup.find_all('td')
    for tr in soup.find_all('tr'):
        tds = tr.find_all('td')
        row = [elem.text.encode('utf-8') for elem in tds[0:len(tds)-1]]
        for x in row[4:]:
            other_list.append(row)
    return other_list

def get_links():
    html = 'http://www.sedar.com'
        for form in soup.find_all('form'):
        links_list.append(html + form.get('action'))
    return links_list

def write_to_output():
    text = print_list()
    get_links()
    text = [[s.strip() for s in inner] for inner in text[1:]]
    for a in text:
        a.remove('')
    i = 0
    with open('sedar.csv', 'wb') as outputfile:
        writer = csv.writer(outputfile)
        for b in text:
            if b[0] == time:
                writer.writerow(['Surge'])
                writer.writerow(text[i])
                writer.writerow([links_list[i]])
                writer.writerow('')
                i = i + 1
            else:
                print "done"
                break

write_to_output()

```