Python Check If Pattern In String