[Python3] 5-line sorting
\n\nclass Solution:\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        ans = []\n        for ll, rr in
\n```\nclass Solution:\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        ans = []\n        for ll, rr in zip(l, r): \n            seq = sorted(nums[ll:rr+1])\n            ans.append(len(set(seq[i] - seq[i-1] for i in range(1, len(seq)))) == 1)\n        return ans \n```\n\n```\nclass Solution:\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        \n        def fn(seq): \n            """Return True if seq is an arithmetic subarray."""\n            mn, mx = min(seq), max(seq)\n            if mn == mx: return True # edge case \n            step = (mx - mn) / (len(seq) - 1)\n            seq = [(x - mn)/step for x in seq] # standardize seq \n            return len(set(seq)) == len(seq) and all(x.is_integer() for x in seq)\n        \n        return [fn(nums[ll:rr+1]) for ll, rr in zip(l, r)] \n```
['Python3']