fork download
  1. def regras(x):
  2. if x < 100:
  3. if x % 2 == 0:
  4. return x
  5. else:
  6. return (x+x)
  7.  
  8. lista = [100,200,1000,3000,2,3,4,5,6,7,8]
  9.  
  10. v1 = list(filter(lambda x: x is not None, map(regras,lista)))
  11. print(v1)
Success #stdin #stdout 0.03s 9284KB
stdin
Standard input is empty
stdout
[200, 400, 2000, 6000, 2, 4, 6, 8]