google search api python code example
Example 1: google search api python
# pip install webbrowser
import webbrowser
while True:
question = input("Question: ") # input question
webbrowser.open('http://www.google.com/search?q=' + question)
Example 2: python google api
# python3 -m pip install webbrowser
import webbrowser
question = input("What is your question? ")
webbrowser.open("https://www.google.com" + str(question))