fork download
  1. # your code goes here
  2. def F(arr: list) -> list:
  3. return [x for x in arr if x % 2 == 0]
  4.  
  5.  
  6. arr = [1, 2, 3, 4]
  7. print(F(arr))
Success #stdin #stdout 0.08s 14116KB
stdin
Standard input is empty
stdout
[2, 4]