当前位置: 动力学知识库 > 问答 > 编程问答 >

How to make a small program that can search for words in folder? [PYTHON]

问题描述:

So I'm trying to write a small program that can search for words within files of a specific folder.

It should be able to search for one word as well as a combination of two words or more. Then it should as a result give a list of the file names that include those words.

It's important that I use dictionaries and that the files are given a number within the dictionary.

I've tried several of things but I'm still stuck. Basically I've been thinking that each words within the file have to be split into strings, and then by searching for a string you get a result.

It's important to note that I'm using unicode utf-8.

Anyone willing to help me?

分享给朋友:
您可能感兴趣的文章:
随机阅读: