str(3)
'3'
wikidata = pywikibot.Site('wikidata', 'wikidata')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-712c61190fdd> in <module>()
----> 1 wikidata = pywikibot.Site('wikidata', 'wikidata')

NameError: name 'pywikibot' is not defined
import pywikibot
wikidata = pywikibot.Site('wikidata', 'wikidata')
#Page number one
page = pywikibot.Page(wikidata, 'q%i' % 1)
print str(page.getVersionHistory(reverseOrder=True, total=1)[0][1]) + '\t' + str(1)
  File "<ipython-input-3-0303e1d2667f>", line 5
    print str(page.getVersionHistory(reverseOrder=True, total=1)[0][1]) + '\t' + str(1)
            ^
SyntaxError: invalid syntax
print str(1)
  File "<ipython-input-4-0b6b63228c51>", line 1
    print str(1)
            ^
SyntaxError: invalid syntax
str(page.getVersionHistory(reverseOrder=True, total=1)[0][1])
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-5-572933b4889a> in <module>()
----> 1 str(page.getVersionHistory(reverseOrder=True, total=1)[0][1])

NameError: name 'page' is not defined
import pywikibot
wikidata = pywikibot.Site('wikidata', 'wikidata')
#Page number one
page = pywikibot.Page(wikidata, 'q%i' % 1)
str(page.getVersionHistory(reverseOrder=True, total=1)[0][1])
WARNING: /srv/paws/lib/python3.4/site-packages/ipykernel/__main__.py:5: DeprecationWarning: pywikibot.page.BasePage.getVersionHistory is deprecated; use Page.revisions() instead.

WARNING: /srv/paws/lib/python3.4/site-packages/ipykernel/__main__.py:5: DeprecationWarning: reverseOrder argument of pywikibot.page.BasePage.getVersionHistory is deprecated; use reverse instead.

'2012-10-29T18:18:48Z'
import pywikibot
wikidata = pywikibot.Site('wikidata', 'wikidata')
#Page number one
page = pywikibot.Page(wikidata, 'q%i' % 1)
print page.getVersionHistory(reverseOrder=True, total=1)[0][1]
  File "<ipython-input-7-2cef1691f051>", line 5
    print page.getVersionHistory(reverseOrder=True, total=1)[0][1]
             ^
SyntaxError: invalid syntax
import pywikibot
wikidata = pywikibot.Site('wikidata', 'wikidata')
#Page number one
page = pywikibot.Page(wikidata, 'q%i' % 1)
print(str(page.getVersionHistory(reverseOrder=True, total=1)[0][1]))
2012-10-29T18:18:48Z
WARNING: /srv/paws/lib/python3.4/site-packages/ipykernel/__main__.py:5: DeprecationWarning: pywikibot.page.BasePage.getVersionHistory is deprecated; use Page.revisions() instead.

WARNING: /srv/paws/lib/python3.4/site-packages/ipykernel/__main__.py:5: DeprecationWarning: reverseOrder argument of pywikibot.page.BasePage.getVersionHistory is deprecated; use reverse instead.