Python straightforward solution
Straightforward Solution: similar to the idea in the solution for 828. Unique Letter String\n\n    def numberOfSubarrays(self, nums: List[int], k: int) -> int:\
Straightforward Solution: similar to the idea in [the solution for 828. Unique Letter String](https://leetcode.com/problems/unique-letter-string/discuss/128952/One-pass-O(N)-Straight-Forward)\n```\n    def numberOfSubarrays(self, nums: List[int], k: int) -> int:\n        lst = [-1]\n        for i in range(len(nums)):\n            if nums[i] % 2:\n                lst.append(i)\n        lst.append(len(nums))\n        res = 0\n        for i in range(1, len(lst) - k):\n\t\t    # plus the number of windows containing [lst[i], lst[i+k-1]]\n            res += (lst[i] - lst[i-1]) * (lst[i+k] - lst[i+k-1])\n        return res\n```
[]