fork download
  1. numbers = range(1, 21) #Numbers from 1 to 20 inclusive
  2. divisor = 6
  3. divisible = [num for num in numbers if num % divisor == 0]
  4. print(divisible)
Success #stdin #stdout 0.03s 9520KB
stdin
Standard input is empty
stdout
[6, 12, 18]