Python Elegant & Short | Just Slice
Complexity\n- Time complexity: O(n)\n- Space complexity: O(1)\n\n# Code\n\nclass Solution:\n    def countSeniors(self, details: List[str]) -> int:\n        retu
# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(1)$$\n\n# Code\n```\nclass Solution:\n    def countSeniors(self, details: List[str]) -> int:\n        return sum(int(p[-4:-2]) > 60 for p in details)\n```
['Python3']