<garvit244>71_1.py
def simplifyPath( path):
    result = "/"
    stack = []
    
    index = 0
    while index < len(path):
        if path[index] == '/':
            index += 1
            continue
    
    
        curr_str = ""
        while index < len(path) and path[index] != '/':
            curr_str += path[index]
            index += 1
    
        if curr_str == '.' or curr_str == "":
            index += 1
            continue
        elif curr_str == "..":
            if stack:
                stack.pop()
            index += 1
        else:
            stack.append(curr_str)
            index += 1
    
    for index in range(len(stack)):
        if index != len(stack) -1:
            result += stack[index] + '/'
        else:
            result += stack[index]
    
    return result
def sample_funcname ( var_0 ) :
    var_2 = "/"
    var_3 = [ ]
    var_5 = 0
    while var_5 < len ( var_0 ) :
        if var_0 [ var_5 ] == '/' :
            var_5 += 1
            continue
        var_10 = ""
        while var_5 < len ( var_0 ) and var_0 [ var_5 ] != '/' :
            var_10 += var_0 [ var_5 ]
            var_5 += 1
        if var_10 == '.' or var_10 == "" :
            var_5 += 1
            continue
        elif var_10 == ".." :
            if var_3 :
                var_3.pop ( )
            var_5 += 1
        else :
            var_3.append ( var_10 )
            var_5 += 1
    for var_5 in range ( len ( var_3 ) ) :
        if var_5 != len ( var_3 ) - 1 :
            var_2 += var_3 [ var_5 ] + '/'
        else :
            var_2 += var_3 [ var_5 ]
    return var_2
