「python入門」readline()でファイルを読み込む方法

pythonコード
f = open(“demo.txt”)
line = f.readline()
while line:
print line,
# print(line, end = ”)
line = f.readline()

f.close()

Comments are closed.