2022-02-01から1ヶ月間の記事一覧
CSVモジュール Readerオブジェクト CSVモジュールを使ってCSVファイルからデータを読み込むには、Readerオブジェクトを生成する。 >>> import csv # 別途インストール不要 >>> example_file = open('example.csv') >>> example_reader = csv.reader(example_…
# 正規表現を使わないテキストパターン検索 from pyexpat.errors import messages def is_phone_number(text): if (len(text) != 12): # 文字列長がぴったり12文字かどうか調べる return False for i in range(0,3): if not text[i].isdecimal(): return Fal…