8 lines python code
\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        attackingQueens = []; directions = [
```\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        attackingQueens = []; directions = [-1,0,1]\n        for dx in directions:\n            for dy in directions:\n                if dx==dy==0: continue\n                x,y = king\n                while(0<=x+dx<8 and 0<=y+dy<8):\n                    x+=dx;y+=dy;if ([x,y] in queens):attackingQueens.append([x,y]);break\n        return attackingQueens\n                \n        \n        \n```
[]