I have list containing multiple dictionary objects. I want to detect when there is no value in a specific key-value pair. When the value exists it is numeric. When the value does not exist, it appears to be is an empty string (judging from the Stack Data).
Initially I tried:
for dictionary_item in row_list:
if dictionary_item['targetkey'] == '':
#do stuff
This throws an "unsupported operand type" error when it encounters a number.
The value in the key-value pair may be either a number or an empty string. What is a good test expression for this scenario?