hope u like it:P

```
def countSmaller(self, nums):
cnt_array = []
sorted_array = []
for i in range(len(nums)-1, -1, -1):
cnt_array.append(bisect.bisect_left(sorted_array, nums[i]))
bisect.insort_left(sorted_array, nums[i])
return cnt_array[::-1]
```