Secretary of State for Work and Pensions on the effect of that Department’s welfare policies on women 在陈述中如何在给定的文本中找到特定于女性的单词(例如,参见上面的文本),以及它们在python中使用了多少次。and Pensions on the effect of that Department’s welfare policies on women" maleCount
如何在文本文件中查找字符串或列表。如果我有一个文本文件,只有单词,随机单词,而不是句子,我如何在其中找到一个字符串。假设我接受用户输入,如何测试或检查用户输入的字符串是否存在于文本文件中。到目前为止,我有这样的想法: b = a.split() #converts the string froma lis