Ad

Just returns the generator instead

Code
Diff
  • def find_multiples_of_4_and_6(n):
        return (i for i in range(n) if not (i%4 and i%6))
    
    • def find_multiples_of_4_and_6(n):
    • for i in range(n):
    • if not (i % 4 and i % 6):
    • yield i
    • return (i for i in range(n) if not (i%4 and i%6))