아래의 코드로 도와 주시겠습니까? 왜 txt 파일의 내용을 폴더에 인쇄하지 않는지 이해할 수 없습니까?파이썬을 통해 txt 파일에서 데이터 가져 오기
import os
directory = raw_input("Provide the folder location")
for files in os.listdir(directory):
if files.endswith(".txt"):
f=open(files, 'r')
for line in f.readlines():
print line
'파일 '을 인쇄 하시겠습니까? 죽어라? '.txt'로 끝나나요? –