fork download
  1. def func(v):
  2. return v if v > 4 else type(v)(0)
  3.  
  4. a = [1, 2, 3.4, 5]
  5. print(list(map(func, a)))
  6.  
Success #stdin #stdout 0.02s 9232KB
stdin
Standard input is empty
stdout
[0, 0, 0.0, 5]