def is_dictlist(data):
 if isinstance(data, list):
  for element in data:
   if isinstance(element, dict):
    if (len(element) != 1):
     return False
   else:
    return False
  return True
 return False

def is_dictlist ( data ) : if isinstance ( data , list ) : for element in data : if isinstance ( element , dict ) : if ( len ( element ) != 1 ) : return False else : return False return True return False
returns true if data is a list of one-element dicts .