I have a two-dimensional array, where each cell contains a dictionary that is randomly populated with a human, mosquito(es), or both. This looks like this:
{'human': Human instance, 'mosquitoes': [Mosquito instance]}
I loop through the two-dimensional array, and for every cell I check:
for row in my_array:
for cell in row:
if cell['human']:
do this
elif cell['mosquitoes']:
do this
elif cell[both]:
do this
I've already tried the things suggested here, but I haven't been able to get it to work so far.