I have blank cells in an attribute table I'd like to catch using python. These cells are not filled with <Null> but are simply blank. Will this statement catch all possibilities in a blank cell? The blank cells could only occur in string fields and would be produced using Collector Classic on an iPhone since, for some reason, it doesn't enforce required fields like an Android phone does and instead just fills required text fields with an empty value.
if x == [None, '', ' ']:
#do something
I think None actually catches <Null> but can't hurt to have it there I guess.
Solved! Go to Solution.
IN
None in [None, '', ' ']
True
'' in [None, '', ' ']
True
' ' in [None, '', ' ']
True
' ' in [None, '', 'b ']
False
' ' in [None, '', ' b']
False
IN
None in [None, '', ' ']
True
'' in [None, '', ' ']
True
' ' in [None, '', ' ']
True
' ' in [None, '', 'b ']
False
' ' in [None, '', ' b']
False
BTW <null> isn't a real thing it is a visual artifact used to represent None which is a real thing but isn't reflected by its textual representation... it is nothing and there is only one None