Evernote interview question

Write a function In Python to search a ransom note using a string pattern.

Interview Answer

Anonymous

7 Oct 2017

def searchRansom(searchFor,note): pattern = re.compile(searchFor) return True if pattern.search(note) else False