Paulo Freitas Paulo Freitas - 1 month ago 6
Python Question

Non-recursive os.walk()

I'm looking for a way to do a non-recursive

os.walk()
walk, just like
os.listdir()
works. But I need to return in the same way the
os.walk()
returns. Any idea?

Thank you in advance.

Answer
next(os.walk(...))