KOTA ITO

Generation

generate functionFri, 16 Dec 2022

「調査対象期間:」という文字列と「〜」という文字に囲まれた文字列を取得する

def get_survey_period(text): start = text.find('調査対象期間:') + len('調査対象期間:') end = text.find('〜', start) return text[start : end]

Questions about programming?Chat with your personal AI assistant