def commonprefix(m):
if not m: return '<STR_LIT>'<EOL>s1 = min(m)<EOL>s2 = max(m)<EOL>for i, c in enumerate(s1):<EOL><INDENT>if c != s2[i]:<EOL><INDENT>return s1[:i]<EOL><DEDENT><DEDENT>return s1<EOL>
Given a list of pathnames, returns the longest common leading component