我一直尝试使用 dict.keys 从我的字典中获取键列表,但它一直给我:
def reverse(PB = {'l': 3, 'y':1, 'u':2}): print(PB.keys())
印刷:
dict_keys(['u', 'l', 'y'])
在我拥有 2.7 以上的 python 版本之前,我从未遇到过这个问题...有什么想法吗?
dictionary key python-3.x
dictionary ×1
key ×1
python-3.x ×1