fork(1) download
  1. f=lambda x:x and~x[0]%2*x and x[:1]+f(x[1:])
  2.  
  3. print f([14, 42, 2324, 97090, 4080622, 171480372])
  4. print f([42, 14, 42, 2324])
  5. print f([7,14,42])
  6. print f([])
  7. print f([171480372, 13, 14, 42])
  8. print f([42, 14, 42, 43, 41, 4080622, 171480372])
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
[14, 42, 2324, 97090, 4080622, 171480372]
[42, 14, 42, 2324]
[]
[]
[171480372]
[42, 14, 42]