def parse_path ( path ) : version , project = path [ 1 : ] . split ( '/' ) return dict ( version = int ( version ) , project = project )
how to make dictionary from dynamic path string python3
Parse path string .
def parse_path(path):
    """Parse path string."""
    version, project = path[1:].split('/')
    return dict(version=int(version), project=project)