Simplest Python code
\n# Code\n\nclass Solution:\n    def arraySign(self, nums: List[int]) -> int:\n        p=nums[0]\n        for i in range(1,len(nums)):\n            p*=nums[i]\n
\n# Code\n```\nclass Solution:\n    def arraySign(self, nums: List[int]) -> int:\n        p=nums[0]\n        for i in range(1,len(nums)):\n            p*=nums[i]\n        if p==0: return 0\n        elif p>0: return 1\n        else: return -1\n```
['Python3']