Spaces:
Runtime error
Runtime error
| import os | |
| class path : | |
| def get_parent_path(path,levels=1): | |
| for _ in range(levels): | |
| path = os.path.dirname(path) | |
| return path | |