I wanted to get the directories in a path, so I did:
directory = os.path.dirname(os.path.abspath(__file__))
self.dir = directory
I then did this:
self.path = os.path.abspath(self.dir)
self.path_list = self.path.split(os.path.sep)
If I now print self.path_list, I get:
['', 'home', 'marienbad', 'python3']
Why is there an empty string at the start?