import pywikibot
site = pywikibot.Site('en', 'wikipedia')  # The site we want to run our bot on
for i in []:
    page = pywikibot.Page(site, i)
    page.text = page.text.replace('the', 'con')
    page.save('Replacing "the" with "con"')  # Saves the page