class Solution(object):
def findNumbers(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
# 列表推导式
return len([i for i in nums if len(str(i)) % 2 == 0])
Leetcode【1295】Find Numbers with Even Number of Digits(Python版)
猜你喜欢
转载自blog.csdn.net/ssjdoudou/article/details/103924770
今日推荐
周排行