June 2023
Intermediate to advanced
316 pages
4h 31m
Japanese
1 #!/usr/bin/env python 2 import sys, re, operator, string 3 from abc import ABCMeta 4 5 # 6 # クラス 7 # 8 class TFExercise(metaclass=ABCMeta): 9 __metaclass__ = ABCMeta 10 11 def info(self): 12 return self.__class__.__name__ 13 14 class DataStorageManager(TFExercise): 15 """ ファイル内容のモデル化 """ 16 17 def __init__(self, path_to_file): 18 with open(path_to_file) as f: 19 self._data = f.read() 20 pattern = re.compile(r'[\W_]+') 21 self._data = pattern.sub(' ', self._data).lower() ...
Read now
Unlock full access