def getYN(inputtext=''):
    """Promtpes the user for a Yes or No response.
Returns 'y' or 'n' based on user response.
Non-Y/N responses prompt user to re-enter a response.
*inputtext defines the text preceding the user interaction"""
    while 1:
        outputtext=input(inputtext + '\nPlease Enter Y/N:\n')
        if outputtext.lower() in ['y','n']:
            return outputtext.lower()[0]
        else: print('INVALID SELECTION')