• + 0 comments

    Python3 Using list comprehension

    def designerPdfViewer(h, word):
        # Write your code here
        letters = 'abcdefghijklmnopqrstuvwxyz'
        width = len(word)
        index_list = [letters.index(x) for x in word]
        length = max([h[x] for x in index_list])
        return width*length