컨텍스트 매니저 : 원하는 타이밍에 정확하게 리소스를 할당 및 제공, 반환하는 역할가장 대표적인 with 구문 이해 with open('./testfile2.txt','w') as f: f.write('Context Manger')with문을 사용하면 따로 close() 함수를 사용하지 않아도 자원을 반환합니다. with문 커스텀마이징클래스를 만들어서 자원의 할당과 반환하는 역할 제공class MyFileWriter(): def __init__(self,file_nmae,method): pirnt('MyFileWriter started : __init__') self.file_obj = open(file_nmae, method) def __enter__(self): pr..