Pythonで保存する方法

with open('sample.txt', 'w') as f:
  print('XXXXX', file=f)
with open('sample.txt') as f:
  print(f.readlines())

import ccxt
from pprint import pprint

with open(‘sample.txt’, ‘w’) as f:
print(ccxt.exchanges, file=f)

with open(‘sample.txt’) as f:
print(f.readlines())

タイトルとURLをコピーしました