Aug-05-2020, 04:19 PM
(Aug-04-2020, 10:00 PM)bowlofred Wrote: By doing path.split(dirpath)[-1], you're asking for "the last component of the path", which is a str.
If you just remove the bracket, you're asking for all components, which will be a collection (a tuple in this case). You need it to be a string, probably with underscores between them, so you want (another) join. Something like:
"_".join(path.split(dirpath))
I apologize for all these questions, but where do I add that additional join?