One Line Solution Python3
\n\n# Code\n\nclass Solution:\n    def largestAltitude(self, gain: List[int]) -> int:\n        return max([0] + [sum(gain[:i+1]) for i in range(len(gain))])   \
\n\n# Code\n```\nclass Solution:\n    def largestAltitude(self, gain: List[int]) -> int:\n        return max([0] + [sum(gain[:i+1]) for i in range(len(gain))])   \n\n\n```
['Python3']