你可以使用 index 列表的功能
index
例如
>>> word_list.index('white') 2
但是如果猜测不在列表中,你会得到一个 ValueError . 你需要处理这个异常。
ValueError