words = ['be', 'is', 'are']
word_length = {word: len(word) for word in words}
print(word_length)
{'be': 2, 'is': 2, 'are': 3}
Learn Flask development and learn to build cool apps with our premium Python course on Udemy.
We will keep you Python-motivated if you subscribe below.