chesslib/board.py
def occupied(self, color):
        '''
            Return a list of coordinates occupied by `color`
        '''
        result = []
        if(color not in ("black", "white")): raise InvalidColor

        for coord in self:
            if self[coord].color == color:
                result.append(coord)
        return result

            Return a list of coordinates occupied by `color`
        
Return a list of coordinates occupied by `color`
Return a list of coordinates occupied by ` color `
def occupied(self, color):
        result = []
        if(color not in ("black", "white")): raise InvalidColor
        for coord in self:
            if self[coord].color == color:
                result.append(coord)
        return result
def occupied ( self , color ) : result = [ ] if ( color not in ( "black" , "white" ) ) : raise InvalidColor for coord in self : if self [ coord ] . color == color : result . append ( coord ) return result
Return a list of coordinates occupied by `color`
Return a list of coordinates occupied by ` color `
'''
            Return a list of coordinates occupied by `color`
        '''
self
color