Write a python function to accept user input to continue


Topic: Write a python function to accept user input to continue

Solution

def get_userinput():
    while(1):
        do_continue = raw_input('Do you want to continue(y/n)?')
        if do_continue == 'y' or do_continue == 'n':
            return do_continue



List all Python Programs