python: 字典的keys() values() 取得字典的键与值
>>> attr={"class":"avdata card","data-hash-id":"data-hash-id"} >>> attr.keys() dict_keys(['class', 'data-hash-id'])
>>> list(attr.keys()) ['class', 'data-hash-id'] >>> attr.values() dict_values(['avdata card', 'data-hash-id']) >>> list(attr.values()) ['avdata card', 'data-hash-id'] >>>