Have searched for a python choose your own adventure game but the closest I have found is the text based game 'Droids' which i have used some code from to create the conditional below that prints pages of a book depending on user input. My question is how do I create a conditional that will prompt after every page is displayed to the user and return the correct page and then display a new prompt to continue the story.
#Defines the first page that is displayed
def page0():
print "\n %s" % firstpage
def page3():
print "\n %s" % thirdpage
def page10():
print "\n %s" % tenthpage
#prints page 0
print page0()
#Choice 1 returns page 3 or 10
ch1 = str(input("Type 3 or 10: "))
if ch1 in ['3']:
print (thirdpage)
elif ch1 in ['10']:
print (tenthpage)