invert binary array in python

@iVirus said:
data2 = [int(not i) for i in data]

works fine, thanks