':type s: str
:type d: List[str]
:rtype: str'

def findLongestWord(self, s, d):

    d.sort(key=(lambda x: ((- len(x)), x)))
    for word in d:
        i = 0
        for c in s:
            if ((i < len(word)) and (word[i] == c)):
                i += 1
        if (i == len(word)):
            return word
    return ''
