Can this code be simplified?

Based on other constructive feedback I’ve gotten from previous chapters, does the following solution scale or is this bad code hygiene?

def divisible_by_ten(nums):
  return len([i for i in nums if i%10==0])

Comprehensions are scalable, with the only constraint being available memory. Your solution is the same as what I wrote way back when, which should tell you that I never once considered ‘hygiene’. I like expressive solutions as opposed to imperative, but that doesn’t mean I have enough expertise to warrant an opinion.

As code simplicity is concerned, the comprehension is the simplest. Consider,

return len(list(filter(lambda n: not n % 10, x)))

More code, possibly more complexity, but one minor advantage… It may use less memory. Something to look into.