Naive Algorithm String Matching Python