How to do a partial check with string or array in Python?
I have a string like this
"doamins" and it should partially match with "domainsid"
I tried with few examples I will explain what I need
eg 1: - > This is not fine as I need "domain" which should be a partial match
"domains" in "domainid"
False
eg 2: - > This works as expected (but there is problem at example at eg 3)
"domains" in "domainsid"
True
eg 3: - > This is not fine as "d" shud not match (but instead "domain shud be matched")
>>> "d" in "domainsid"
True
>>> "d" in "domainid"
True