Get the common prefix from a list of strings using Python.
import os
words = [
'alpha',
'alphabet',
'alphabetical',
'alphanumeric',
]
print(os.path.commonprefix(words))
alpha
Posted Jun 24, 2020.
https://www.darklaunch.com/2020/06/24/python-get-common-prefix-from-a-list-of-strings.html