title: Open multiple tabs in selenium using python
body: <p>I have generated a list of links using selenium,i need to open each link in a separate tab.I have tried <code>body.send_keys(Keys.CONTROL +"t")</code>
  and <code>body.send_keys(Keys.COMMAND+"t")</code> but both didn't work(no errors but nothing happens), after searching for answers i found this link <a href="https://stackoverflow.com/questions/28431765/open-web-in-new-tab-selenium-python">Opening new tabs selenium</a>,however they mostly used java script(which works it opens a new tab) to run it which i can not seem to manipulate such as
  <code>driver.execute_script('''window.open("http://bings.com","_blank");''')</code> however i can not use this in a for loop as follows:</p>
  
  <pre><code>for link in links:
      #driver.execute_script("window.open('https://www.yahoo.com')")
      driver.execute_script("window.open('%s')")%link
  </code></pre>
  
  <p>Edit <a href="https://stackoverflow.com/questions/28431765/open-web-in-new-tab-selenium-python">1</a>: To possible duplicate,the answers given that work are java script codes which works,however i can't use directly in a for loop.</p>
  
  <p>Do i have to open a new random site (using the java script above) then <code>driver.get(link)</code> to get to my original link</p>
  
  <p>If it matters i use python 2.7 on Linux.</p>