def divisible_by(numbers, divisor):
return [x for x in numbers if x % divisor == 0]
i know it returns the divisible numbers from the array of numbers, but can someone explain how it gets there?
I am learning python as my first language, but i have not got to arrays yet.
i am mostly confused by this part "x for x in numbers if x"
Thanks