python easy solution
\tclass Solution:\n\t\tdef minimumAverageDifference(self, nums: List[int]) -> int:\n\t\t\tminiAverage = float("inf")\n\t\t\tleft = 0\n\t\t\ts = sum(nums)\n\t\t\
\tclass Solution:\n\t\tdef minimumAverageDifference(self, nums: List[int]) -> int:\n\t\t\tminiAverage = float("inf")\n\t\t\tleft = 0\n\t\t\ts = sum(nums)\n\t\t\tres = 0\n\t\t\tfor i, num in enumerate(nums):\n\t\t\t\tleft += num\n\t\t\t\tright = s - left\n\t\t\t\tif i != len(nums) - 1:\n\t\t\t\t\tif abs(left // (i + 1) - right // (len(nums) - i - 1)) < miniAverage:\n\t\t\t\t\t\tminiAverage = abs(left // (i + 1) - right // (len(nums) - i - 1))\n\t\t\t\t\t\tres = i\n\t\t\t\telse:\n\t\t\t\t\tif left // (i + 1) < miniAverage:\n\t\t\t\t\t\tres = i\n\t\t\treturn res
['Python3']