Ich habe es wie folgt gemacht
Code: Select all
import os
# current working directory
print(os.getcwd())
# files present in that directory
dir_contents = os.listdir('.')
# below is the output of the dir_contents
print(dir_contents)
['.test.json.crc', '.wf_list_dir_param.py.crc', 'test.json', 'wf_list_dir_param.py']
Ich muss Folgendes tun
- die Elemente herausfinden, die mit wf beginnen und mit param.py enden
- alles vor _param.py als Variable extrahieren
Mobile version