generate functionWed, 22 Feb 2023

functions to get info from wikipedia

import wikipedia wikipedia.search("John") # => ['John', 'John (artist)', 'John the Baptist', 'John (given name)', 'John the Revelator', 'John Doe', 'John Lennon', 'John Smith', 'John of Gaunt', 'John Mayall'] wikipedia.summary("John", sentences=1) # => 'John is a common English name and surname: John (given name) John (surname), including a list of people with the name John' wikipedia.suggest("John") # => 'John'

Questions about programming?Chat with your personal AI assistant