Determine the common prefix of multiple strings
Never rewrite what is provided to you: os.path.commonprefix does exactly this: Return the longest path prefix (taken character-by-character) that is a prefix of all paths in list. If list is empty, return the empty string (”). Note that this may return invalid paths because it works a character at a time. For comparison to the … Read more