0
나는 다음을 수행하려고 파이썬으로 텍스트 파일을 여는 방법?
file = open('test.txt', 'w+')
item = "hello"
file.write(item)
print(file)
나는 다음과 같은 출력을 얻을이 프로그램을 실행
,<_io.TextIOWrapper name='test.txt' mode='w+' encoding='cp1252'>
가능한 중복 http://stackoverflow.com/questions/6159900/correct-way-to-write-line-to-file-in-python) –
'print (file)'가 무엇을 기대합니까? – Tim
@tim 고마워. 그냥 혼란스러워. 나는 지금 내가 뭘 잘못했는지 이해한다. – ruthless