0

I have a directory set up like this:

content/
content/file1-helloworld.txt
content/file2myproject.txt
content/file3_howareyou.txt

And in python I have the following:

file = open("content/FILE_NAME.txt", "r")
print (file.read())

I would like to reference the files with a wildcard. So I can open "file1-helloworld.txt" by asking for file1(wildcard) or something similar.

zondo
  • 19,901
  • 8
  • 44
  • 83

0 Answers0