a=[1,2,3,0,45,0] func = lambda tvoe_chislo: 1 if tvoe_chislo == 0 else 0b=[func(i) for i in a]print(b)
Standard input is empty
[0, 0, 0, 1, 0, 1]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!