2018-01-10から1日間の記事一覧
メモ。テキストファイル操作いろいろ。 #テキストデータを読み込む file="./test/fox.txt" # "test/fox.txt" でも可 fileobj=open(file) text=fileobj.read() fileobj.close() print(text) print("-----------") #with-asを使ってファイル処理 close()が不要…
メモ。テキストファイル操作いろいろ。 #テキストデータを読み込む file="./test/fox.txt" # "test/fox.txt" でも可 fileobj=open(file) text=fileobj.read() fileobj.close() print(text) print("-----------") #with-asを使ってファイル処理 close()が不要…