Python3 using yield
\nclass Solution:\n    def prefixesDivBy5(self, A: List[int]) -> List[bool]:\n        x = 0\n        for i in range(len(A)):\n            x = x*2+A[i]\n        
```\nclass Solution:\n    def prefixesDivBy5(self, A: List[int]) -> List[bool]:\n        x = 0\n        for i in range(len(A)):\n            x = x*2+A[i]\n            yield x%5==0\n```
['Python3']