As commented previously: >>> vocab = ['a', 'b', 'c'] >>> vocab_lookup = {k:v for v,k in enumerate(vocab)}.
確定! 回上一頁