def getYN(text=''):
    """Prompts user for yes or no input.
accepts y,Y,yes,Yes,YES,n,N,no,No,NO.
returns 'y' for yes and 'n' for no.
other inputs prompt user to re-enter a response"""
    AcceptableResponses={'y':'y','yes':'y','n':'n','no':'n'}
    while 1:
        print(text)
        userInput=input('Please select Yes or No (y/n):').lower()
        if userInput in list(AcceptableResponses.keys()):
            return AcceptableResponses[userInput]
        else:
            print("""
Invalid input - not recognized as yes or no \n
[Proper response required to exit loop]""")