我有一个文本文件,里面有4篇不同的文章,其中包含单词,每篇文章都由文本"<NEW ARTICLE>"分隔Take a look at
what I found.我想要做的是读取这个文件并将其转换为字典,然后计算使用"<NEW ARTICLE>" or "ARTICLE>"的次数。这样,当我搜索单词"dark and shiny"时,它会
', ',', 'from', 'to']d = { of : {in : 1, and : 2, to: 0}, in : { of : 2, and : 5, to : 3},and : {of : 3, in: 6, to: 2}, to: {and: 1, of: 0, in: 3}}
我想从列表l中遍历,如果字典d中的列表l中有单词<