You can use enumerate
to iterate through a list and get the index of the current item at the same time.
print [idx for idx, field in enumerate(fieldnames) if values[idx] is not None]
# [1, 3]
If you want the fieldnames, then
print [field for idx, field in enumerate(fieldnames) if values[idx] is not None]
# ['oranges', 'bananas']