python3.6 TypeError: 'dict_keys' object does not support indexing

版本问题

在python2中

firstStr = myTree.keys()[0]

在python3中

firstStr = list(myTree.keys())[0]


猜你喜欢

转载自blog.csdn.net/lzp1510681927/article/details/78472750
今日推荐