How to deal with zero-values in Python?

Hello,

Just some Basic-couriousity.

import clr

OUT = []
for i in IN[0]: 
    OUT.append(float(i))
if i == 0:
	pass

can i do something like that? i want either kick out the value or replace in by “0”

OUT = list()
for i in IN[0]:
 if i != None:
    OUT.append(float(i))
 if i == 0:
	pass

None is the equivalent of null in Python.

https://www.learnpython.org/en/Variables_and_Types

1 Like