1.helloFile = open("E:\\Python\\test\\20.1.15\\hello.txt")
print(helloFile)
報錯:<_io.TextIOWrapper name='E:\\Python\\test\\20.1.15\\hello.txt' mode='r' encoding='cp936'>
應該print(helloFile.read())
2.open方法里可能會加newline=,表示換行符
1.helloFile = open("E:\\Python\\test\\20.1.15\\hello.txt")
print(helloFile)
報錯:<_io.TextIOWrapper name='E:\\Python\\test\\20.1.15\\hello.txt' mode='r' encoding='cp936'>
應該print(helloFile.read())
2.open方法里可能會加newline=,表示換行符