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,040
  • 7
  • 42
  • 82

0 Answers0