def checkEntry(self, entry, selected):
        '''Returns the entry and whether or not it is valid.'''
        entry = entry.upper()
        if entry in invertedSpaces:
            entry = invertedSpaces[entry]
        if entry not in possibleInput:
            return {'valid':False,'entry':entry, 'message':'\n{} is not a valid entry!'}
        if entry not in selected:
            return {'valid':True,'entry':entry}
        else:
            return {'valid':False,'entry':entry, 'message':'\n{} has already been selected!'}
Returns the entry and whether or not it is valid.
recipes/Python/580723_TicTacToe_text_based/recipe-580723.py