re re.sub() 置換 使い方 str = re.sub(置換前,置換後,対象,置換回数) 「対象」の中の「置換前」と一致する文字列を「置換後」に入れえます import re txt1 = 'a-aa-aaa' txt2 = ... re
re re.compile() パターン 使い方 obj = re.compile(パターン) 「パターン」をobjに格納します import re pattern=re.compile('a') print(pattern) #結果 re.co... re