I have a list & a dictionary.
l = ['one', 'two', 'three', 'four']
d = {'aw.one' : '#aw.one', 'aw.two' : '#aw.two'}
Now, I have a string :
s = "this is one sentence"
I want to check if any items in list l is present in string or not. If yes, then I want to get the value from dictionary whose key contains that item from list.
for example, in given example
- 'one' from string is present in list l
- then I need #aw.one to be printed.
If my string is :
s = "this is two balls"
it should print
#aw.two.
How can I do that?