
# 
factorial_value = {}


def factorial(n):
    if factorial_value.get(n) == None:
        result = 1
        for i in range(1, n + 1):
            result *= i
        factorial_value[n] = result
    else:
        print(f'Get from cache value factorial({n})')
        
    return factorial_value[n]


# ------------------------------------------------------------------------------


exchange_rates = {
    "USD": 1.0,
    "EUR": 0.861775,
    "GBP": 0.726763,
    "INR": 75.054725,
    "AUD": 1.333679,
    "CAD": 1.237816,
    "SGD": 1.346851,
}


def convert(fr, to, quontity):
    return round((quontity * (exchange_rates[to] / exchange_rates[fr])), ndigits=2)



def lstrip(lst, value):
    new_lst = []
    for x in lst:
        if x != value or len(new_lst):
            new_lst.append(x)
    return new_lst

    # return [x for x in lst if x != value]
    
    

def main():

    data = [0, 0, 1, 0, 2, 3]
    print(data)
    print(lstrip(data, 0))
    print(data)

    # print(convert("USD", "AUD", 1000))
    # print(convert("EUR", "USD", 100))



if __name__ == '__main__':
    main()
    # print(dir())
    # print(globals())
    