Easy Solution in four line in Python
\nclass Solution:\n    def largestPerimeter(self, nums: List[int]) -> int:\n        nums = sorted(nums)        \n        for i in range(len(nums)-1,1,-1):\n    
```\nclass Solution:\n    def largestPerimeter(self, nums: List[int]) -> int:\n        nums = sorted(nums)        \n        for i in range(len(nums)-1,1,-1):\n            if nums[i]+nums[i-1] > nums[i-2] and nums[i-1]+nums[i-2] > nums[i] and nums[i]+nums[i-2] > nums[i-1]:\n                return (nums[i]+nums[i-1]+nums[i-2])\n        return 0\n```
['Python']