(path)
return list(path)
Maybe convert a '/' separated string into a list.
Maybe convert a '/' separated string into a list.
Maybe convert a / separated string into a list .
def path2list(path):
    '''
    Maybe convert a '/' separated string into a list.
    '''
    if isinstance(path,str): 
        path = path.split('/')
        if path[-1] == '': path.pop() # remove trailing '/'
        return path

    return list(path)
def path2list ( path ) : if isinstance ( path , str ) : path = path . split ( '/' ) if path [ - 1 ] == '' : path . pop ( ) # remove trailing '/' return path return list ( path )