Can you show me how to query the Wikipedia API in python?
system
kya aap mujhe dikhaa sakate hai ki paythan main vikipedia epiai ko kaise queri karen?
user
yah fnction paythan anurodh modul kaa upyog karata he jise aapako alag se sthapit karne kii aavashyaktaa ho sakati he.

aayaat anurodh

DEF QUERY_WIKIPEDIA_API (queri):
    url = f "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles= (query }&redirects=1"
    pratikriya = requests.get (url)
    print (response.json ())

query_wikipedia_api ("paythan programing bhashaa")

yah input ke rup main ek khoj queri letaa he, ise vikipedia epiai queri ke liye URL main jodta he, epiai ko ek get anurodh bhejtaa he, or consol ke liye JSON pratikriya ko print karata he.
assistant
<|system|>
</s>
<|user|>
kya aap mujhe dikhaa sakate hai ki paythan main vikipedia epiai ko kaise queri karen?</s>
<|assistant|>
yah fnction paythan anurodh modul kaa upyog karata he jise aapako alag se sthapit karne kii aavashyaktaa ho sakati he.

aayaat anurodh

DEF QUERY_WIKIPEDIA_API (queri):
    url = f "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles= (query }&redirects=1"
    pratikriya = requests.get (url)
    print (response.json ())

query_wikipedia_api ("paythan programing bhashaa")

yah input ke rup main ek khoj queri letaa he, ise vikipedia epiai queri ke liye URL main jodta he, epiai ko ek get anurodh bhejtaa he, or consol ke liye JSON pratikriya ko print karata he.</s>
