 <p>In order to move from one page to another, you need to use a variable to show what page the user is currently reading. Previous and Next would then update the page number and display the appropriate page:</p> <pre><code>file = ['page1.txt', 'page2.txt', 'page3.txt', 'page4.txt'] pagecount = len(file) page = 1 # initialize to a default page if inp == '1': page = 1 read(file[page-1]) # pages are 1-4, subscripts are 0-3 # ... pages 2-4 go here elif inp == '+': # whatever key you use for Next page = min(page+1, pagecount) # don't go beyond last page read(file[page-1]) elif inp == '-': # switch statements use "if .. elif .. elif .. else" page = max(page-1, 1) read(file[page-1]) </code></pre> <p>After you get that version working, you can generalize it to allow an arbitrary number of pages by constructing the file name from the page number instead of storing filenames in a list. And you only need one "read" for your input loop -- since every key reads a page you can factor that out of each individual key.</p>