def two_int_list(value):
    return isinstance(value, list) and len(value) == 2 and all(map(lambda x:
        isinstance(x, int), value))

def validate_dict_key(dictionary, key, valid=two_int_list):
    return key in dictionary and valid(dictionary[key])
validate_dict_key({'obj': [58, -234]}, 'obj')
validate_dict_key({'obj': [32]}, 'obj')
Check if dictionary key is filled with list of 2 numbers