Open URLs on chrome
<p>I have a .csv file that contains a column of urls (40-50 urls), I want to read the csv file and open all those urls on chrome? Is there a way to accomplish this in python?  I'm using the following piece of code to read the csv file.</p>

<pre><code>exampleFile = open('MyFile.csv')
exampleReader = csv.reader(exampleFile)
exampleData = list(exampleReader)
final = []
for item in exampleData:
    final.append(item[0])
for item in final:
    ???
</code></pre>

<p>You can use <a href="http://www.seleniumhq.org/" rel="nofollow"><code>selenium</code></a> web driver to load each URL in chrome.</p>

<p>Reading the csv file can be improved like this:</p>

<pre><code>from selenium import webdriver

driver = webdriver.Chrome()

with open('MyFile.csv') as example_file:
    example_reader = csv.reader(example_file)
    for row in example_reader:
        driver.get(row[0])
        # do whatever...

    driver.close()
</code></pre>

python