[Python3] simulation
Please check out this commit for solutions of weekly 274. \n\n\nclass Solution:\n    def numberOfBeams(self, bank: List[str]) -> int:\n        ans = prev = 0 \n
Please check out this [commit](https://github.com/gaosanyong/leetcode/commit/18f88320ffb2c2a06e86fad46d82ebd17dadad64) for solutions of weekly 274. \n\n```\nclass Solution:\n    def numberOfBeams(self, bank: List[str]) -> int:\n        ans = prev = 0 \n        for row in bank: \n            curr = row.count(\'1\')\n            if curr: \n                ans += prev * curr\n                prev = curr \n        return ans \n```
['Python3']