I need some help!

Hey guys i was thinking to code somthing for myself that would open the links that i use on regular basis using python, but i am getting alot of problems it says that ‘open’ module is ot defined on line 8 please help:

import webbrowser

links = ["www.facebook.com", "www.google.com"]
def open_tabs(url_lists):
    for element in url_lists:
def main():
    webbrowser.open("www.youtube.com", new=2, autoraise=False)



if you take a second to look at the documentation of the open function it says:

Note that on some platforms, trying to open a filename using this function, may work and start the operating system’s associated program. However, this is neither supported nor portable.

so this doesn’t seem to be the right function to use, we don’t want to depend on something that might or in most cases might not work, its too risky

documentation can be found here:


1 Like

thanks for your help!