Original code :
for dir_name, dir_path, file_name in os.walk(dir):
doSomething()
What can we use from pathlib module instead of os.walk().
Thankss....
Python 3.12 adds pathlib.Path.walk()
.
https://docs.python.org/3.12/library/pathlib.html#pathlib.Path.walk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With