반응형 #널판단1 Python in operator (Regular Expression Matching) Nowadays I really focus on preparing coding interview. I am going to briefly summarize and post what I learn and study. text = "aa" pattern = "a" # Whether pattern is null or not # if it is null return False if not pattern: return not text # Input text is not null # Pattern has the same character or '.' first_match = bool(text) and pattern[0] in {text[0], '.'} if len(pattern) >= 2 and pattern[1].. 2019. 1. 10. 이전 1 다음 반응형