fork(2) download
  1. a=[1,2,3,0,45,0]
  2.  
  3. func = lambda tvoe_chislo: 1 if tvoe_chislo == 0 else 0
  4. b=[func(i) for i in a]
  5. print(b)
Success #stdin #stdout 0.01s 27704KB
stdin
Standard input is empty
stdout
[0, 0, 0, 1, 0, 1]