[Python3] line sweep
\n\nclass Solution:\n    def arraySign(self, nums: List[int]) -> int:\n        ans = 1\n        for x in nums: \n            if x == 0: return 0 \n            i
\n```\nclass Solution:\n    def arraySign(self, nums: List[int]) -> int:\n        ans = 1\n        for x in nums: \n            if x == 0: return 0 \n            if x < 0: ans *= -1\n        return ans \n```
['Python3']