输入字符串：abpppl
字典：[able, apple, sample, abppl, pl]
给定一个输入字符串和一个字典，创建一个函数，找到给定字符串中作为子序列的最长单词。
def findLongestWord(string, dict): 
    maxLen = 0
    result = "" 

    for word in dict: 
        if isSubsequence(word, string): 
            if len(word) > maxLen: 
                maxLen = len(word) 
                result = word  
  
    return result