Python Webbrowser.open_new_tab()














































Python Webbrowser.open_new_tab()



Description
In Webbrowser module there is a function called webbrowser.open_new_tab() which help's us to open url in a new page of the default browser if possible other wise it works same as webbrowser.open_new() function work.
This function take "URL" as parameter and open the inputted url in a new tab in default browser window. 

Syntax : 
webbrowser.open_new_tab(url)

Sample Code :
import webbrowser

url = "http://www.cppsecrets.com"
webbrowser.open_new_tab(url)

Output :






Comments