human
I am working on the file "Python 복습/08일차.금_정규표현식, class, 크롤링, 숙제/8일차_1T,3T_정규 표현식_이메일, 핸드폰 번호, Class_.ipynb".
The first task is:
예제: Factorial
Can you write Python code for it?

=====
Give me a the Python code you requested?
assistant
#Here is the Python code you requested.

class Factorial():
    
    cache = {
        1: 1,
    }
    
    @staticmethod
    def run(n):
        
        if n in Factorial.cache:
            return Factorial.cache[n]
        
        Factorial.cache[n] = n * Factorial.run(n-1)
        return Factorial.cache[n]
    
    @staticmethod
    def prettify():
        print("\n".join([
            "{n}! == {result}".format(n=key, result=value)
            for key, value
            in Factorial.cache.items()
        ]))

Factorial.run(4)

Factorial.prettify()