pathlib python 썸네일형 리스트형 python file line read and set import pathlib file_name = "sample.txt" current_path = pathlib.Path(__file__).parent with open(current_path.joinpath(file_name)) as f: set_samples = set(map(str.strip, f)) #파일을 라인단위로 읽어 set 으로 만든다. 더보기 이전 1 다음