You're all dumb.
Just kidding :P you\'re a smart and unique person ;)\n\nBasically odds get 1, evens get assigned 0 by the lambda funciton. It then sorts them based on that.\n\n
Just kidding :P you\'re a smart and unique person ;)\n\nBasically odds get 1, evens get assigned 0 by the lambda funciton. It then sorts them based on that.\n```\nclass Solution:\n    def sortArrayByParity(self, A: List[int]) -> List[int]:\n        return sorted(A, key = lambda x: x % 2)\n```
['Sorting', 'Python3']