require less code, Tweepy has the Cursor object.
Old way vs Cursor way
----------------------
+=====================
First let's demonstrate iterating the statuses in the authenticated
user's timeline. Here is how we would do it the "old way" before the
the results.
Passing parameters into the API method
---------------------------------------
+======================================
What if you need to pass in parameters to the API method?
makes a request.
Items or Pages
---------------
+==============
So far we have just demonstrated pagination iterating per
item. What if instead you want to process per page of results? You
Limits
-------
+======
What if you only want n items or pages returned? You pass into the
items() or pages() methods the limit you want to impose.