pyhtonコードの覚書です。
基本的に生成AIで作成したものになります。
書き出し
#-------------------------
#bing chatより
#-------------------------
data = ['apple', 'banana', 'cherry']
# ファイルを開く
file = open('output.txt', 'w')
# ファイルに書き出す
for item in data:
file.write(item + '\n')
# ファイルを閉じる
file.close()
コメント