結果 : compare first n characters of two strings in python