一种数据结构,键是一组单词,值是单个单词或字符串

a data structure with key as a cluster of words and value as a single word or string

我想创建一个数据结构,能够将一组或一组单词映射到单个单词或字符串,它可以被认为是字典在 python 中的反向操作。

你可以使用普通的字典:

targetword = "good"
wordmap = {
    "best": targetword,
    "positive": targetword,
    "awesome": targetword,
    "fantastic": targetword
}