I want to use the function os.listdir(path) to get a list of files from the directory I’m running the script in, but how do I say the current directory in the “path” argument?
I want to use the function os.listdir(path) to get a list of files from
Share
Use os.curdir, and then if you want a full path you can use other functions from os.path: