Python provides a module called "google" with which you can access google. You can use something like this:
try:
from googlesearch import search
except ImportError:
print("No module named 'google' found")
# to search
query = "Edureka"
for j in search(query, tld=".com", num=5, stop=1, pause=2.0):
print(j)