import wikipedia def search_wiki(text): article_list = wikipedia.search(text) wikipedia.page(article_list[0]) def get_wiki(search_term): return wikipedia.page(search_term) # src = search_wiki('spacex') get = get_wiki('spacex') # print(src) print(get) print(wikipedia.summary("Python Programming Language")) x = search_wiki('spacex') print('done')