Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT string = [ " ted " , " tex " , " red " , " tax " , " tad " , " den " , " rex " , " pee " ] NEW_LINE beginWord = " red " NEW_LINE endWord = " tax " NEW_LINE res = findLadders ( string , beginWord , endWord ) NEW_LINE displaypath ( res ) NEW_LINE DEDENT