✅  Python || accepted solution 80% faster || Sort
python\nclass Solution:\n    def sortArrayByParity(self, nums: List[int]) -> List[int]:\n        nums.sort(key=lambda x: x%2)\n        return nums\n\n\nTime Com
```python\nclass Solution:\n    def sortArrayByParity(self, nums: List[int]) -> List[int]:\n        nums.sort(key=lambda x: x%2)\n        return nums\n```\n\nTime Complexity: O(N log N)\nNote: In List python use Tim sort algorithms https://en.wikipedia.org/wiki/Timsort
['Sorting']