I have these strings:
final1 = 'do not do that'
final2 = 'wh ghm wh matm'
and this dictionary:
contopp = {
'do not': "don't"
'i am': "i'm"
}
and I would like to check if any part of the dictionary keys is in any part of the strings. I know about any(), but the problem is, I also need to know what the matching key is. Is this possible?
This would just need to return 'do not', as I don't need to know which string matches.