Easy to understand Python Solution
\nclass Solution:\n    def minimumAverageDifference(self, nums: List[int]) -> int:\n        if len(nums) == 1:\n            return 0\n        min_avg_diff = mat
```\nclass Solution:\n    def minimumAverageDifference(self, nums: List[int]) -> int:\n        if len(nums) == 1:\n            return 0\n        min_avg_diff = math.inf\n        index = -1\n        one, two = 0, sum(nums)\n        for i in range(0, len(nums)):\n            one = one + nums[i]\n            two = two - nums[i]\n            one_avg = one//(i+1)\n            if i == len(nums)-1:\n                two_avg = 0\n            else:\n                two_avg = two//(len(nums)-i-1)\n            avg_diff = abs(one_avg-two_avg)\n            if avg_diff < min_avg_diff:\n                min_avg_diff = avg_diff\n                index = i\n        return index\n```
[]