[Solved] Sum in range that meet criteria [closed]


This is the approach you may look into:


def thesum(the_numbers):
  the_numbers = [i for i in the_numbers if i % 3 == 0 or i % 5 == 0]
  return print(sum(the_numbers))

thesum(range(100))


0

solved Sum in range that meet criteria [closed]