在多个文件中搜索多个单词

编程入门 行业动态 更新时间:2024-10-08 08:22:49
本文介绍了在多个文件中搜索多个单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经成功创建了一个程序,可以在多个文件中搜索单词,但现在我需要能够通过多个单词进行搜索。我已经将之前讨论的代码添加到我的原始程序中,但我不确定它们应该如何组合在一起。有人可以为我清除这个吗?

I have successfully created a program that searches for a word in multiple files but now I need to be able to search by more than one word. I have add code from a previous discussion to my original program but I am unsure how they should fit together. Can someone clear this up for me?

展开 | 选择 | Wrap | 行号 推荐答案

我已经成功创建了一个在多个文件中搜索单词的程序,但现在我需要能够通过多个单词进行搜索。我已经将之前讨论的代码添加到我的原始程序中,但我不确定它们应该如何组合在一起。有人可以为我清除这个吗? I have successfully created a program that searches for a word in multiple files but now I need to be able to search by more than one word. I have add code from a previous discussion to my original program but I am unsure how they should fit together. Can someone clear this up for me? 展开 | 选择 | Wrap | 行号

这是我现在拥有的。它搜索就好了但是当我添加第二个单词时它会给我一个错误。我添加了一个print语句,看它是否正在分割输入,它是。我列出了我一直在底部的错误。我无法弄清楚出了什么问题。 感谢您的帮助。 Here is what I have now. It searchs on just fine but when I add a second word it gives me an error. I added a print statement to see if it was splitting the input and it is. I have listed the error I keep getting at the bottom. I can''t figure out what is wrong. Thanks for all your help. 展开 | 选择 | Wrap | 行号

这是我现在拥有的。它搜索就好了但是当我添加第二个单词时它会给我一个错误。我添加了一个print语句,看它是否正在分割输入,它是。我列出了我一直在底部的错误。我无法弄清楚出了什么问题。 感谢您的帮助。 Here is what I have now. It searchs on just fine but when I add a second word it gives me an error. I added a print statement to see if it was splitting the input and it is. I have listed the error I keep getting at the bottom. I can''t figure out what is wrong. Thanks for all your help. 展开 | 选择 | Wrap | 行号

更多推荐

在多个文件中搜索多个单词

本文发布于:2023-11-28 20:23:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643826.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   单词   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!