在读取 Python 字典的键值对时:
for word, i in word2index:
报错:
ValueError: not enough values to unpack (expected 2, got 1)
【解决方法】
改为
for word, i in word2index.items():
在读取 Python 字典的键值对时:
for word, i in word2index:
报错:
ValueError: not enough values to unpack (expected 2, got 1)
【解决方法】
改为
for word, i in word2index.items():