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>Assuming your posted snippet is alright and <code>final</code> contains valid urls you could do something like this:</p>

<pre><code>import webbrowser

exampleFile = open('MyFile.csv')
exampleReader = csv.reader(exampleFile)
exampleData = list(exampleReader)
final = []

for item in exampleData:
    final.append(item[0])
for url in final:
    webbrowser.open_new_tab(url)
</code></pre>

<p>For more information take a look to the <a href="https://docs.python.org/3/library/webbrowser.html" rel="nofollow">Convenient Web-browser controller</a></p>

python