notebook.community
Edit and run
In [1]: lst = list(range(1, 100)) def compute(lst): total = 0 for i in lst: if i % 3 == 0 or i % 5 == 0: total += i return total print(compute(lst))
lst = list(range(1, 100)) def compute(lst): total = 0 for i in lst: if i % 3 == 0 or i % 5 == 0: total += i return total print(compute(lst))
2318