>>> 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'] >>>
标签:hash,attr,python,keys,values,data,id,字典 From: https://www.cnblogs.com/xkdn/p/17199081.html