is there a way to get one level above or below directory from the one that is given?
For example ‘/a/b/c/’ directory was entered in a function.
So function would return:
lvl_down = '/a/b/'
lvl_up = '/a/b/c/d/'
I think you can do it using ‘re’ module (at least with one level below directory), but maybe there is more simple and better way to do it without regex?
I have no idea, how the function should know, that you want to go in directory d:
Note: Had another solution before, but os.path is a much better one.