[Python3] 1 Line Solution: Lambda Function
\n#Sort the array in increasing order of difference with x\n#Return first k sorted elements from the list\n\ndef findClosestElements(self, arr: List[int], k: in
```\n#Sort the array in increasing order of difference with x\n#Return first k sorted elements from the list\n\ndef findClosestElements(self, arr: List[int], k: int, x: int) -> List[int]:\n        arr = sorted(arr, key=lambda i: abs(x - i))\n        return sorted(arr[:k])\n```
['Sorting', 'Python', 'Python3']