Ad
Code
Diff
  • def euler(num):
        return sum(x*(x%3*x%5==0)for x in range(num))
    • def euler(num):
    • return sum([x for x in range(num) if not x % 3 or not x % 5])
    • return sum(x*(x%3*x%5==0)for x in range(num))