def get_value_by_key(attrs, *args):
 for search_attr_key in args:
  for (attr_key, attr_value) in attrs.iteritems():
   if (attr_key.lower() == search_attr_key):
    return attr_value
 return None

def get_value_by_key ( attrs , * args ) : for search_attr_key in args : for ( attr_key , attr_value ) in attrs . iteritems ( ) : if ( attr_key . lower ( ) == search_attr_key ) : return attr_value return None
helper to get attribute values for n attribute names .