def get_word_len_dict(text):
    result_dict = {}
for word in text.split():
    if len(word) in result_dict:
        result_dict[len(word)].add(word)
else:
    result_dict[len(word)] = {word}
return result_dict
Creating a dictionary where the key is an integer and the value is the length of a random sentence