What is the best way to implement a reusable usr confirmation?
Basically so that I can embed it in other functions, so that the user will get to confirm if output is ok or whether they want to recall function or quit.
So it seems it should be like.
def userConfirm():
"""get user confirmation to proceed"""
userConfirm = input("Are you happy with results? (Y or N or Q): ")
if userConfirm() == 'N':
#Call some function again
elif userConfirm() == 'Q':
#terminate program
else:
pass
2 questions.
1) How do I call the functions if I don't know what they are?
2) what 'return' do I use for my function if the logic is complete?