Elegant way to take basename of directory in Python?
Elegant way to take basename of directory in Python? Question: I have several scripts that take as input a directory name, and my program creates files in those directories. Sometimes I want to take the basename of a directory given to the program and use it to make various files in the directory. For example, …