import webbrowser # 指定要開啟的網址 url = "https://www.python.org" # 在預設瀏覽器中開啟網址 webbrowser.open(url)