leetpycode/easy/number_of_senior_citizens.py

8 lines
228 B
Python

# https://leetcode.com/problems/number-of-senior-citizens
from typing import List
class Solution:
def countSeniors(self, details: List[str]) -> int:
return len(list(filter(lambda x: int(x[11:13]) > 60, details)))