finallywe'll tell the program to open web browser tabs for our results add the following to the end of your program#python searchpypi py opens several search results import requestssyswebbrowserbs --snip-open browser tab for each result linkelems soup select(package-snippet'numopen min( len(linkelems)for in range(numopen)urltoopen 'print('opening'urltoopenwebbrowser open(urltoopenby defaultyou open the first five search results in new tabs using the webbrowser module howeverthe user may have searched for something that turned up fewer than five results the soup select(call returns list of all the elements that matched your package-snippetselectorso the number of tabs you want to open is either or the length of this list (whichever is smallerthe built-in python function min(returns the smallest of the integer or float arguments it is passed (there is also built-in max(function that returns the largest argument it is passed you can use min(to find out whether there are fewer than five links in the list and store the number of links to open in variable named numopen then you can run through for loop by calling range(numopenon each iteration of the loopyou use webbrowser open(to open new tab in the web browser note that the href attribute' value in the returned elements do not have the initial now you can instantly open the first five pypi search results forsayboring stuff by running searchpypi boring stuff on the command line(see appendix for how to easily run programs on your operating system ideas for similar programs the benefit of tabbed browsing is that you can easily open links in new tabs to peruse later program that automatically opens several links at once can be nice shortcut to do the followingopen all the product pages after searching shopping site such as amazon open all the links to reviews for single product open the result links to photos after performing search on photo site such as flickr or imgur web scraping