Extract only certain files from a folder in python as list
Extract only certain files from a folder in python as list Question: I have the following list of files in my folder: data.txt an_123.txt info.log an_234.txt filename.txt main.py an_55.txt I would like to extract only the .txt files that have prefix an as list. The output should look like the following: [an_123.txt, an_234.txt, an_55.txt] What …