Python3|| Easy solution.
Code\n\nclass Solution:\n    def sortArrayByParityII(self, nums: List[int]) -> List[int]:\n        even = []\n        odd = []\n        lst=[]\n        for i in
# Code\n```\nclass Solution:\n    def sortArrayByParityII(self, nums: List[int]) -> List[int]:\n        even = []\n        odd = []\n        lst=[]\n        for i in range(len(nums)):\n            if nums[i]%2 == 0:\n                even.append(nums[i])\n            else:\n                odd.append(nums[i])\n        for i in range(len(even)):\n            lst.append(even[i])\n            lst.append(odd[i])\n        return lst\n```\n![image.png](https://assets.leetcode.com/users/images/d1d1fa02-4b7b-4404-b577-ebef47fd1b2f_1677865820.3052886.png)\n
['Array', 'Python3']