Longest Common Prefix String In Python