import pywikibot
site = pywikibot.Site("en", "wikipedia")
page = pywikibot.Page(site, "Douglas Adams")
item = pywikibot.ItemPage.fromPage(page)
print(item)
 
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-d1501f129c34> in <module>()
----> 1 print(item)

NameError: name 'item' is not defined