파이썬 디버깅 기본
폴더와 파일 구분 import os #현재 폴더의 파일/폴더를 출력 output = os.listdir(".") print("os.listdir():", output) #현재 폴더의 파일/폴더를 구분 print("폴더와 파일 구분하기") for path in output: if os.path.isdir(path): print("폴더:", path) else: print("파일:", path) os.listdir(): ['.idea', 'test.py', 'test.txt', 'venv'] 폴더와 파일 구분하기 폴더: .idea 파일: test.py 파일: test.txt 폴더: venv 파일 탐색 import os # 폴더를 읽어 들이는 함수 def read_folder(path): output = os..
2020.01.03