fork(1) 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. v1 = list(map(regras,lista))
  10. print(v1)
Success #stdin #stdout 0.04s 9300KB
stdin
Standard input is empty
stdout
[200, 400, 2000, 6000, 2, None, 4, None, 6, None, 8]