작동하지 않는 이유를 모릅니다
import glob
import os
read_files = glob.glob("*.txt")
with open("alltogether.txt", "wb") as outfile:
for f in read_files:
outfile.write(os.path.basename(f))
with open(f, "rb") as infile:
outfile.write(infile.read()
오류 : 들여 쓰기가 외부 들여 쓰기 수준과 일치하지 않습니다.
표시되는 오류는 탭이 엉망임을 의미합니다. 모두 괜찮은지 확인하고 탭 1 번 대신 4 번 공간을 사용해보세요.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다