I should say I\'m looking for a solution to the problem of viewing output that does not fit on your screen. For example, range(100) will show the last 30ish lin
If you want to do this for an interactive python session, you should use a terminal emulation that allows you to scroll back up. I believe most of them do.
If you're using an actual terminal, or if you don't have a choice of terminal emulators, perhaps you can use GNU screen.
(If you're using Windows, you can change the screen buffer size to allow scrolling back up to 9999 lines).
And if you need this for the output of your program, you can try to use the curses module to implement scrolling yourself.