[Python3] One line
First of all, I remembered this problem Find the Prefix Common Array of Two Arrays and the approach used to solve it ([Python3] One line), but instead of crossi
First of all, I remembered this problem [Find the Prefix Common Array of Two Arrays](https://leetcode.com/problems/find-the-prefix-common-array-of-two-arrays/) and the approach used to solve it ([[Python3] One line](https://leetcode.com/problems/find-the-prefix-common-array-of-two-arrays/discuss/3467605/python3-one-line)), but instead of crossing, you need to take the difference between the left and right parts.

```python []
class Solution:
    def distinctDifferenceArray(self, nums: List[int]) -> List[int]:
        return [len(set(nums[:i + 1])) - len(set(nums[i + 1:])) for i in range(len(nums))]
```
['Python', 'Python3']