「Python 文字コードを指定してファイルを開く」の版間の差分
ナビゲーションに移動
検索に移動
| 1行目: | 1行目: | ||
==Python 文字コードを指定してファイルを開く== | ==Python 文字コードを指定してファイルを開く== | ||
| − | [[Python]] | + | [[Python]] | |
import codecs | import codecs | ||
2020年2月15日 (土) 08:38時点における版
Python 文字コードを指定してファイルを開く
Python |
import codecs
fd = codecs.open(search_result_file, 'r', 'shift_jis')
for l in fd:
print l
© 2006 矢木浩人