splitting a path into 2 parts example input https algorithmsunixtest py for url output part0 https algorithmsunix part1 test py input algorithmsunixtest py for file path output part0 algorithmsunix part1 test py takt the origin path without the last part take the last element of list takt the origin path without the last part take the last element of list
import os

def split(path):
    parts = []
    split_part = path.rpartition('/')
    
    parts.append(split_part[0])
    
    parts.append(split_part[2])
    return parts