「python入門」readlines()でファイルを読み込むサンプル
サンプルコード
filename = 'test_cft.txt' with open(filename) as file_object: lines = file_object.readlines() for line in lines: print(line.strip())
Coding Changes the World
サンプルコード
filename = 'test_cft.txt' with open(filename) as file_object: lines = file_object.readlines() for line in lines: print(line.strip())