import collections
sentence = "No, I shouldn't be glad, YOU should be glad."
d = collections.defaultdict(list)
words = sentence.split()
for k, v in zip(words[:-1], words[1:]):
    d[k].append(v)
print(d)
change sentence into dictionary in Python