Easy Python Solution
\n# Code\n\nclass Solution:\n    def applyOperations(self, nums: List[int]) -> List[int]:\n        l=[]\n        c=0\n        for i in range(len(nums)-1):\n    
\n# Code\n```\nclass Solution:\n    def applyOperations(self, nums: List[int]) -> List[int]:\n        l=[]\n        c=0\n        for i in range(len(nums)-1):\n            if(nums[i]==nums[i+1]):\n                nums[i]=nums[i]*2\n                nums[i+1]=0\n        for i in nums:\n            if i!=0:\n                l.append(i)\n            else:\n                c+=1\n        return l+[0]*c\n```
['Python', 'Python3']