如何将附加参数传递给 webbrowser.open

How to pass additional arguments to webbrowser.open

import webbrowser
number = input('Enter text ')
webbrowser.open("https://www.bing.com/search?q=",number)
exit = input('press any key to exit')

基本上我需要搜索用户说的输入,但是当用户按下输入时它只搜索 www.bing.com/search?q=

尝试这样做:

webbrowser.open(f"https://www.bing.com/search?q={number}")

使用f-strings,应该可以!