I want to use python to find out two folder names match similar prefix or not, folders e.g.
folder
folder_v2
folder_v3
I know there should be many ways to do this, like split the folder names into 2 parts, and only compare the first part.
But is there an elegant way to do this?
And it reminds me symbol * in the Linux bash (in bash, folder* reprent all folders and files with prefix folder) ? I hope something similar struture with:
if ('folder'== 'folder*'):
print('this is a good match')