Python Detect String Using Python Pip