I'm trying to open a set of URL links in a web browser in the order they are listed in, but every time I run the below code, the order is different. I'm new to scripting, but understand that lists keep order, which is what I am using below, so I'm confused as to why it isn't working. I suspect it may be due to load time of certain pages, so what can I do to ensure that individual tabs are opened in the listed order, and circumvent any page load time effects on the order?
import webbrowser
urls = ["google.com", "yahoo.com", "bing.com", "duckduckgo.com"]
firefox_path = "C:\\Program Files\\Mozilla Firefox\\firefox.exe"
webbrowser.register('firefox', None, webbrowser.BackgroundBrowser(firefox_path), 1)
for i in urls:
webbrowser.get('firefox').open_new_tab(i)