Say I have a file structure that looks like this

root folder/
    -folder a
    -folder b

How could I load the img.png file from
Should I just have a function in that gets the path of the root folder, and then tac the 'folder a' and 'folder b' bit on?

Thanks for your time.


or (safer, cross platform)

import os
path = os.path.join("..", "folderb", "img.png")

Thanks but I've solved it a different way :)