python_solution
\nclass Solution:\n    def minimumAverageDifference(self, nums: List[int]) -> int:\n        n = len(nums)\n        sum_num = sum(nums)\n        left_Sum = 0\n  
```\nclass Solution:\n    def minimumAverageDifference(self, nums: List[int]) -> int:\n        n = len(nums)\n        sum_num = sum(nums)\n        left_Sum = 0\n        s = [math.inf,math.inf]\n        for i , j in enumerate(nums):\n            left_Sum  += j\n            left_avg = left_Sum//(i+1)\n            right_avg = (sum_num - left_Sum) // (n-i-1) if (n-i-1) != 0 else 0\n            avg = abs(left_avg - right_avg)\n            s = min(s,[avg,i])\n        return(s[1])\n```
['Python']