final_str = 'hello your total sale Fare Rs 741 your bill pls'
r = re.compile(r'\bSale\b|\bFare\b|\fare\b|\bRs\b', flags=re.I | re.X)
p=r.findall(final_str)
lis_con = p
matched = ''.join(lis_con)
res = final_str
list_of_words = res.split()
gotdata = list_of_words[list_of_words.index(lis_con[0]) + 1]
print(gotdata)
So far I have tried this but not reaching the result, output expectation is it should check all list of words present in the dictionary and its return digit, for example, it matches Sale, Fare, Rs So its return the next word but I want to return the only digit in my case it should return 45. I think I need to check isDigit() any help highly appreciated.