Here slightly edited code from one of my earliest posts to DaniWeb. Limitted by recursion limit of Python as it uses recursion, but interesting for me.
This was response to thread, where student was required to produce one themself. I thought maybe it is of interest for somebody learning to understand recursion.
Good for you to mention what is there at standard library, additionally there is similar things in modules
glob (but glob uses fnmatch, if I remember correctly, and fnmatch is using re after massaging the input format).
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.