๐Ÿ“ฆ Adib234 / Leetcode

๐Ÿ“„ find_numbers_and_even_number_of_digits.py ยท 9 lines
1
2
3
4
5
6
7
8
9class Solution:
    def findNumbers(self, nums: List[int]) -> int:
        total = 0
        for i in range(len(nums)):
            s = str(nums[i])
            if len(s) % 2 == 0:
                total += 1
        return total