How to add a list as a parameter in sparql query in python
问题 I am using SPARQLWrapper as follows to run my wikidata query. from SPARQLWrapper import SPARQLWrapper, JSON import pandas as pd sparql = SPARQLWrapper("https://query.wikidata.org/sparql") sparql.setQuery(""" SELECT DISTINCT ?item { VALUES ?searchTerm { "word2vec" "fasttext" "natural language processing" "deep learning" "support vector machine" } SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "EntitySearch". bd:serviceParam wikibase:endpoint "www.wikidata.org". bd:serviceParam wikibase